On 08/20/2010 01:53 AM, Tapas Mishra wrote: > Ok > I looked at man page of gcc and searched for > DMODULE D__KERNEL and DLINUX got following > > Pattern not found (press RETURN) GCC does not have information about compiling the kernel. The information that you were suggested to read it how to configure GCC so it can find the kernel headers. Personally, I use 'make' to compile my sources. But I really think that you should read about C programming in general a little more, specifically how a compiler works. Linux uses a very complex build system and if you want to write modules for it, the best chances you have is to work with that system. Perhaps you can start with a simple driver module project to understand what is happening. Have a look at this book: http://lwn.net/Kernel/LDD3/ Also, I suggest you find yourself a good C book that explains how the compiler will find the includes at the top of your code. For this code to work: #include <linux/module.h> Your compiler should be told where to find the header files that are in the kernel sources. HTH, Wouter -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ