I am compiling my code to create a shared library and finally linking them to the correct libraries(shared libraries). However when i view my shared library with “nm -u” it shows unresolved symbols, mainly from (libm.so and libstdc++.so). I have compiled it with the flags -Wl,–no-undefined -Wl,–no-undefined-version but during linking it doesnot report anything.
Are these symbols reported by nm for libm and libstdc++ intended?
Please note that i am cross compiling for QNX OS.
Thanks in advance and kind Regards,
Yes: when you link against shared libraries, the symbols stay unresolved. They get bound to the definition in the shared library at runtime. That’s what it means to link dynamically against other libraries.
Update:
This is because
connectinlibsocketis a versioned symbol, butpowinlibmis not. You can read about versioned symbols here.This is a weakly-defined symbol, not an unresolved one. You can read about weak ELF symbols here.