Problems linking with g++
I've been trying for over a day now to get my program to compile and link using the g++ (3.4.3) compiler on linux (RedHat). Previously I have used the intel compiler and have had no problems. The link errors I'm getting look like this:
All of the undefined references are to the STL, and to operator new and operator delete.
mylibrary.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()'
If I do an 'ldd mylibrary.so', it does *not* list libstdc++, which doesn't make much sense to me as I am dynamically linking to to it. (My makefile is passing "-Wl,-Bdynamic -shared" to g++ when linking.)
Would appreciate any suggestions, as I'm all out of ideas. I've spent the day googling, but haven't found anything helpful. I've tried every combination of every command line option to g++ that seems like it should make a difference (eg static linking to libstd++ instead of dynamic linking), but nothing works.