Ok, here is the exact call to g++ (just with the library and object names changed to protect the innocent):
Errors are as described before:
g++ -L/my/lib/path -Wl,-rpath-link /my/lib/path -Wl,-Bdynamic -o executable_name file1.o file2.o
-lstdc++ -lgcc -llibrary1 -llibrary2 -lpthread -llibrary3
/my/home/dir/file1.cpp:177: undefined reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::c_str() const'
All errors involve the STL and operator new/delete. Compiles file but doesn't link. To rule out a broken installation of gcc, I've now tried two machines - both generate the same errors. I've tried moving the "-lstdc++" to different parts of the command line, but it makes no difference (and I don't think should be required at all, anyway).
/my/home/dir/liblibrary1.so: undefined reference to `std::allocator<wchar_t>::allocator()'