Find the answer to your Linux question:
Results 1 to 2 of 2
Hi i have installed Mandriva 2008 in my laptop (586 arch) From the add remove utilites, i was able to add files related to kernel programming.(It is loaded in /usr/src/../linux) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    9

    Module programming


    Hi i have installed Mandriva 2008 in my laptop (586 arch)
    From the add remove utilites, i was able to add files related to kernel programming.(It is loaded in /usr/src/../linux)
    In the code i tried to include the module.h and printk.h, which the compiler was not able to detect.

    So i gave the option of -I to include the dir for the header files, but on linking throws Error pertaining to the header files.

    Your help regarding this would be of great help.

  2. #2
    Just Joined!
    Join Date
    Jan 2007
    Location
    Sydney, Australia
    Posts
    86
    You also need to pass the information to the linker. I believe it is -L so you have to supply this information to both the linker and the compiler. The complier wants the .h files, whereas the linker wants the location of the library files (often .so). Depending on your IDE (assuming you are running one) you can get it to figure out all this for you.

Posting Permissions

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