About EXPORT_SYMBOL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi every one..
I have a piece of code in which I am trying to use EXPORT_SYMBOL. The code is a sample test program where I am trying to make a module. I am trying to compile it on linux 2.4.18-14.

Now when I am tyring to compile the file the error shown is as below

************************************8

gcc -I/usr/src/linux-2.4.18-14/include -Wall -O2 -D__KERNEL__ -DMODULE -c -o main.o main.c

main.c:255: parse error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"

main.c:255: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'

main.c:255: warning: data definition has no type or storage class

make: *** [main.o] Error 1

*****************************************8

The code listing on line 255 is as follows

*****************************8

EXPORT_SYMBOL(sw_print);

init_module(init);
cleanup_module(finish);
*********************************

I have also tried to add export-objs := main.o in the Makefile but in vain.
I know that same type of question was also raised some time back by another person but no one replied.
If someone could help then it would be very much appreciated.

Thanks and Regards
Dp




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux