Jimen Ching, thank you very much for your comments. Here is the -v from gcc and more.B
Script started on Sat Oct 26 04:20:06 2002 jefferson:/home/luoma$ g++ -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/specs Configured with: ../gcc-3.0.4/configure --with-gnu-ld --with-gnu-as Thread model: posix gcc version 3.0.4 jefferson:/home/luoma$ g++ -print-search-dirs programs: =/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/:/usr/lib/gcc/sparc-sun-solaris2.8/3.0.4/:/usr/lib/gcc/sparc-sun-solaris2.8/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/../../../../sparc-sun-solaris2.8/bin/sparc-sun-solaris2.8/3.0.4/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/../../../../sparc-sun-solaris2.8/bin/:/usr/ccs/bin/sparc-sun-solaris2.8/3.0.4/:/usr/ccs/bin/ libraries: =/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/:/usr/lib/gcc/sparc-sun-solaris2.8/3.0.4/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/../../../../sparc-sun-solaris2.8/lib/sparc-sun-solaris2.8/3.0.4/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/../../../../sparc-sun-solaris2.8/lib/:/usr/ccs/bin/sparc-sun-solaris2.8/3.0.4/:/usr/ccs/bin/:/usr/ccs/lib/sparc-sun-solaris2.8/3.0.4/:/usr/ccs/lib/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/../../../sparc-sun-solaris2.8/3.0.4/:/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/../../../:/lib/sparc-sun-solaris2.8/3.0.4/:/lib/:/usr/lib/sparc-sun-solaris2.8/3.0.4/:/usr/lib/ jefferson:/home/luoma$ jefferson:/home/luoma$ echo $LD_LIBRARY_PATH /usr/local/iath/lib:/usr/local/lib:/lib:/usr/lib:/usr/local/pgsql/lib:/opt/SUNWspro/lib:/usr/openwin/lib:/usr/dt/lib:/usr/SAG/apache/libexec jefferson:/home/luoma$ cd map jefferson:/home/luoma/map$ g++ -omap map.cpp /var/tmp/ccwiw3cN.o: In function `std::_Rb_tree<std::string, std::pair<std::string const, std::vector<std::string, std::allocator<std::string> > >, std::_Select1st<std::pair<std::string const, std::vector<std::string, std::allocator<std::string> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocator<std::string> > > > >::_M_empty_initialize()': /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE19_M_empty_initializeEv+0x18): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZNSt8_Rb_treeISsSt4pairIKSsSt6vectorISsSaISsEEESt10_Select1stIS5_ESt4lessISsESaIS5_EE19_M_empty_initializeEv+0x1c): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o: In function `std::_Rb_tree_base_iterator::_M_decrement()': /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZNSt22_Rb_tree_base_iterator12_M_decrementEv+0x10): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZNSt22_Rb_tree_base_iterator12_M_decrementEv+0x14): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o: In function `std::_Rb_tree_rebalance(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)': /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0xc): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x10): more undefined references to `std::_S_rb_tree_red' follow /var/tmp/ccwiw3cN.o: In function `std::_Rb_tree_rebalance(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)': /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0xe4): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0xe8): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0xf4): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0xf8): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x114): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x118): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x17c): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x180): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x198): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x19c): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x1ec): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x1f0): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x21c): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x220): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x22c): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x230): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x24c): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x250): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x2b4): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x2b8): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x2d0): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x2d4): undefined reference to `std::_S_rb_tree_red' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x308): undefined reference to `std::_S_rb_tree_black' /var/tmp/ccwiw3cN.o(.gnu.linkonce.t._ZSt18_Rb_tree_rebalancePSt18_Rb_tree_node_baseRS0_+0x30c): undefined reference to `std::_S_rb_tree_black' collect2: ld returned 1 exit status jefferson:/home/luoma/map$ cat map.cpp #include <map> #include <string> #include <vector> #include <iostream> using namespace std; int main() { map<string, vector<string> > tom; tom["bob"] = vector<string>(3, "bobby"); map<string, vector<string> >::iterator it; it = tom.find("bob"); if (it != tom.end()) { const vector<string>& vs = (*it).second; for (int i = 0; i < vs.size(); i++) { cout << (*it).first << ":" << vs[i] << endl; } } return 0; } jefferson:/home/luoma/map$ cd /usr/lib jefferson:/usr/lib$ find . -name libstdc++\* jefferson:/usr/lib$ cd .. jefferson:/usr$ cd local jefferson:/usr/local$ find . -name libstdc++\* ./lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/libstdc++.a ./lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstdc++.a ./lib/libstdc++.a ./lib/libstdc++.a.2.10.0 ./lib/libstdc++.la ./lib/libstdc++.so ./lib/libstdc++.so.3 ./lib/libstdc++.so.3.0.0 ./lib/libstdc++.so.3.0.1 ./lib/libstdc++.so.3.0.2 ./lib/libstdc++.so.3.0.4 ./lib/libstdc++.so.4 ./lib/libstdc++.so.4.0.0 ./lib/libstdc++.so.2.10.0 ./lib/libstdc++.so.5 ./lib/libstdc++.so.5.0.0 ./lib/sparcv9/libstdc++.a ./lib/sparcv9/libstdc++.la ./lib/sparcv9/libstdc++.so ./lib/sparcv9/libstdc++.so.4 ./lib/sparcv9/libstdc++.so.4.0.0 ./lib/sparcv9/libstdc++.so.5 ./lib/sparcv9/libstdc++.so.5.0.0 ./src/gcc/libstdc++-2.8.1-sol26-sparc-local.gz jefferson:/usr/local$ jefferson:/usr/local$ cd lib jefferson:/usr/local/lib$ ls -la libstd* -rw-r--r-- 1 bin bin 8578200 Aug 29 02:53 libstdc++.a -rw-r--r-- 1 bin bin 2222756 Aug 29 02:53 libstdc++.a.2.10.0 -rwxr-xr-x 1 bin bin 1091 Aug 29 02:53 libstdc++.la* lrwxrwxrwx 1 root other 18 Sep 21 22:55 libstdc++.so -> libstdc++.so.5.0.0* -r-xr-xr-x 1 bin bin 2232464 Aug 29 02:53 libstdc++.so.2.10.0* lrwxrwxrwx 1 root other 18 Sep 21 22:55 libstdc++.so.3 -> libstdc++.so.3.0.2* -rwxr-xr-x 1 bin bin 4879432 Aug 29 02:53 libstdc++.so.3.0.0* -rwxr-xr-x 1 bin bin 2143753 Aug 29 02:53 libstdc++.so.3.0.1* -rwxr-xr-x 1 bin bin 2147624 Aug 29 02:53 libstdc++.so.3.0.2* -rwxr-xr-x 1 root other 2148889 Feb 21 2002 libstdc++.so.3.0.4* lrwxrwxrwx 1 root other 18 Sep 21 02:23 libstdc++.so.4 -> libstdc++.so.4.0.0* -rwxr-xr-x 1 bin bin 7002468 Aug 29 02:53 libstdc++.so.4.0.0* lrwxrwxrwx 1 root other 18 Sep 21 22:55 libstdc++.so.5 -> libstdc++.so.5.0.0* -rwxr-xr-x 1 bin bin 8334044 Aug 29 02:53 libstdc++.so.5.0.0* jefferson:/usr/local/lib$ grep "_S_rb_tree_red" libstd* jefferson:/usr/local/lib$ ^D script done on Sat Oct 26 04:31:03 2002