Header Errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ben Gone
    New Member
    • Feb 2010
    • 2

    Header Errors

    I'm doing something stupid!! Help

    Error:
    In file included from usbDriver.c:2:
    /usr/src/kernels/2.6.31.12-174.2.22.fc12.i 686/include/linux/init.h:245: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parse_early_pa ram’
    /usr/src/kernels/2.6.31.12-174.2.22.fc12.i 686/include/linux/init.h:246: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parse_early_op tions’
    make: *** [usbDriver] Error 1

    Makefile:
    CC=gcc

    INCLUDES=-I/usr/src/kernels/2.6.31.12-174.2.22.fc12.i 686/include -I/usr/include

    usbDriver: usbDriver.c
    ${CC} ${INCLUDES} -c $?


    SourceFile:
    #include <linux/init.h>

    int main(int argc, char *argv[])
    {
    return 0;
    }
  • Ben Gone
    New Member
    • Feb 2010
    • 2

    #2
    Resolved

    My apologies. I discovered that I'm mixing apples and oranges. The problem was that I was trying to associate standard makefile commands while attempting to build a module driver.

    The proper make command was:

    make -C <kernel location> M=`pwd` modules

    The makefile contained:

    obj-m := <codefile>.o

    Of course, the makefile can be changed to simplify the commandline.

    I've been in management too long, and miss the development. But I see, I've got some catching up to do. --- Thanks

    Comment

    Working...