On Wed, 09 Aug 2000,  MIP Splice wrote about,  Adding Files to the Linux Kernel:
> Hi All,
>  
> I have added 2 new files to the Linux kernel:
> 
> 1) a new .h (in /usr/include/linux/myheader.h),
> containing some function prototypes, and #define's.
> 2) a new .c (in /usr/src/linux/net/ipv4/myfile.c),
> containing the definitions of those functions, and
> instances of some data structures.
> 
> I compiled the kernel and rebooted using my kernel
> (which has the new .h and .c files).
> 
> I have a C program which includes the new header
> ( #include<linux/myheader.h> ) that I wrote and
> have compiled into the kernel, but for some reason my
> program is not able to access the new functions I have
> added and I get undefined reference error while
> compiling the program.
> 
> How do I make gcc look for the new files I have
> compiled into the kernel.

User space programs do not belong in the kernel tree.
Place all .h and .c files of yours in one directory, tell GCC what to do in
the Makefile like all other programmers do.

> 
> Thanks.
> 
> -Mahesh
> 
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.linux-learn.org/faqs
-- 
Regards Richard
[EMAIL PROTECTED]
http://people.zeelandnet.nl/pa3gcu/


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to