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.
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.