Is there a linux built-in utility that I can use to test a recently compiled shared library for external links undefined? Gcc seems smart enough to check for undefined characters in my own binary format, but if the character is a link to another library, gcc does not check the link time. Instead, I receive a message only when I try to link my new library to another program.
It seems a bit silly to get undefined help messages in the library when I compile another project, so I want to know if I can check all the links inside and outside when creating the library, not when I link to it.
Error example:
make -C UnitTests debug
make[1]: Entering directory `~/projects/Foo/UnitTests`
g++ [ tons of objects ] -L../libbar/bin -lbar -o UnitTests
libbar.so: undefined reference to `DoSomethingFromAnotherLibrary`
collect2: ld returned 1 exit status
make[1]: *** [~/projects/Foo/UnitTests] Error 1
source
share