I would suggest that you check whether you have that symbol defined in your kernel .o file with nm (or, objdump --syms, readelf -s, etc.). I suspect that you don't actually have it, or if you use C++, it may be a mangling issue (and then you need to use extern "C".)
The fact that you experience the issue only when you use an i/o routine from the library is normal. Libraries are object file packages/archives, such that any object file inside the library is only included by the linker when something inside it is actually used. The library probably has separate object file for the i/o routines inside it which carries the symbol dependency that your kernel fails to satisfy. You can view the contents of the library archive and the symbols in it with the nm command, or use the ar command to view the object file contents, extract individual object files (for testing purposes), etc.
Btw, header files have no play in this. They are entirely a compiler concern, and if your compilation is successful, they are irrelevant. (Well, generally speaking.)
|