Find the answer to your Linux question:
Results 1 to 3 of 3
Dear All, Now I am testing a char driver module in Linux kernel 2.6.18. My module includes char_dev.c, ioctl.c, and char_dev.h files. ioctl.c file has stdio.h, stdlib.h, fcntl.h, unistd.h and ...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    5

    Unhappy module compile error

    Dear All,
    Now I am testing a char driver module in Linux kernel 2.6.18.
    My module includes char_dev.c, ioctl.c, and char_dev.h files.
    ioctl.c file has stdio.h, stdlib.h, fcntl.h, unistd.h and sys/ioctl.h.
    But when I compile using make command. The errors are
    ioctl.c:5:20:error: stdio.h: No such file or directory
    ioctl.c:6:20: error: stdlib.h: No such file or directory
    ioctl.c:7:19: error: fcntl.h: No such file or directory
    ioctl.c:8:20: error: unistd.h: No such file or directory
    ioctl.c:9:23: error: sys/ioctl.h: No such file or directory

    I have insalled build-essential. Then in /usr/include, i found these header files.
    Can I know why i got these error?
    Best,
    Andrew

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    try this to help you out
    Code:
    apt-get install module-assistant
    m-a prepare

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Posts
    5

    module compile error

    Hi coopstah13,
    still get the same problem.
    Andrew

Posting Permissions

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