When a library is found... but doesn't define???

view story

http://www.linuxforums.org – Hi, I am creating a shared library: g++ -shared -Wl,-soname,libmylib.so.1 -o libmylib.so.1.0.1 myobject.o ${LibFlags} where myobject.o is created from: g++ -c -fPIC -Wall ${CFLAGS} ${INCLUDES} myobject.cpp when I run 'nm | grep CAN' on myobject.o, it returns nothing. Yet when I run 'nm | grep CAN' on libmylib.so, I get an unresolved symbol 'U'. I am wondering how this is possible that an unresolved symbol gets into my shared library 'libmylib.so' when it is not included in the object code. The only possibility I can think of is that it gets linked from my {LibFlags}- even though it is not required to be linked from my object code. More interesting, when I type 'nm | grep CAN' on the {libFlags} library, I get a solid 'T' - I think because CAN is strongly defined. So why would 'CAN' get included in my library when it is not used in my object file, and then why would CAN have an unresolved symbol in libmylib, when I linked it with a library that has the symbol resolved? (HowTos)