I have a c++ project with a lots of STL. It compiles fine with gcc 4.3.1 and 4.4.3, but with the new 4.5.0 I get those two missing symbols in linking: std::_List_node_base::_M_hook(std::_List_node_base*) std::_List_node_base::_M_unhook() libstdc++.so from 4.5.0 has those relevant symbols, and the ones not found are there: 000584c4 T std::_List_node_base::_M_hook(std::_List_node_base*) 000585bc T std::__norm::_List_node_base::_M_hook(std::__norm::_List_node_base*) 000ab3c8 T std::__cxx1998::_List_node_base::_M_hook(std::__cxx1998::_List_node_base*) 000584e0 T std::_List_node_base::_M_unhook() 000585d8 T std::__norm::_List_node_base::_M_unhook() 000ab3e4 T std::__cxx1998::_List_node_base::_M_unhook()
Thus the symbols are there, and exported (ie, capital T), everything seems fine to me.
But linker produces messages like this: x.C:229: undefined reference to `std::_List_node_base::_M_hook(std::_List_node_base*)' New with the switch to 4.5.0
Thus, either the linker is buggy, or the installation.
Note, those symbols are new in 4.5.0, thus you should check that your new 4.5.0 *.so is actually searched by linker, ie, check the installation, again, because if the linker tries to link vs the 4.4.x *.so the symbols will not be found.
Sorry, my bad. It really was picking up the default libstdc++.so from the OS installation. I used -R/path/to/4.5.0/libstdc++.so to fix this library path. But it turns out that -L/path/to/4.5.0/libstdc++.so is also required in addition to this, otherwise the default libstdc++.so is looked up by linker. Maybe this is a bug in linker, don't know. But those new symbols revealed the problem.
Ok, thanks, let's close this then.
(In reply to comment #5) > > It really was picking up the default libstdc++.so from the OS installation. I > used -R/path/to/4.5.0/libstdc++.so to fix this library path. But it turns out > that -L/path/to/4.5.0/libstdc++.so is also required in addition to this, > otherwise the default libstdc++.so is looked up by linker. > > Maybe this is a bug in linker, don't know. No, that's the expected behaviour