Find the answer to your Linux question:
Results 1 to 2 of 2
hey i am new to this and getting errors in beginning ... i wrote a hello.c sample device driver code in fc6 #define MODULE #include <linux/module.h> int init_module(void) { printk("<1>Hello, ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    1

    Cool file not found error #include<linux/module.h>

    hey i am new to this and getting errors in beginning ...
    i wrote a hello.c sample device driver code in fc6

    #define MODULE
    #include <linux/module.h>
    int init_module(void) { printk("<1>Hello, world\n"); return 0; }
    void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); }


    i am getting error
    linux/module.h: No such file or directory

    please help

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    You need the driver-devel package(s) and headers installed, then you need to make sure that your Makefile's CFLAGS variable has an include directory option set for the kernel headers: -I /usr/src/linux/include
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...