Martin Jambor wrote:
Actually I do have a prototype in a shared header file. If I don't include the prototype (the declaration) I get the following warningIt seems you don't have the function prototype in any header file included in that source file.
make -C /lib/modules/2.6.10-1.770_FC3/build M=/home/tony/learnexport/user modules
make[1]: Entering directory `/lib/modules/2.6.10-1.770_FC3/build'
CC [M] /home/tony/learnexport/user/user.o
/home/tony/learnexport/user/user.c: In function `user_init':
/home/tony/learnexport/user/user.c:11: warning: implicit declaration of function `some_exported_symbol'
LD [M] /home/tony/learnexport/user/usesexport.o
Building modules, stage 2.
MODPOST
*** Warning: "some_exported_symbol" [/home/tony/learnexport/user/usesexport.ko] undefined!
CC /home/tony/learnexport/user/usesexport.mod.o
LD [M] /home/tony/learnexport/user/usesexport.ko
make[1]: Leaving directory `/lib/modules/2.6.10-1.770_FC3/build'
in addition to the original warning I am trying to resolve. I believe the warning I'm trying to resolve is basically what would normally be a linker error as it cannot find the definition of the function. In my case the code resides in another module. The mainline kernel tree must have a way to handle this as I don't get these types of warnings when compiling the standard kernel modules.
Thanks, -Tony
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/