TL;DR: Use ldd -r libHello.so
to find unresolved symbols in your libHello.so
. Another option is to make your linker complain about theese symbols (with --no-undefined
for ld
). Or look for linking/loading errors later.
For example, you have:
// a.cpp
namespace X {
int someExternValue = 0;
}
// b.cpp