On 11/18/2010 11:01 PM, Russell L. Carter wrote: > Hi all, > I have three g++ versions installed. Debian's native g++-4.3 and > g++-4.4 both use /usr/lib/libstdc++.so.6.13, while > /usr/local/bin/g++-4.5 needs /usr/local/lib64/libstdc++.so.6.14. > > If I use CXX=/usr/local/bin/g++-4.5 at configure time, executables > are linked against /usr/lib/libstdc++.so.6.13, which is not what > I want. What is the approved Cmake Way for insuring that executables > using g++-4.5 link against libstdc++.so.6.14?
The selection of libstdc++ takes place by the usual library searching mechanism, so you must ensure that /usr/local/lib64/libstdc++.so.6.14 takes precedence over /usr/lib/libstdc++.so.6.13 for runtime linking. Use ldconfig in connection with /etc/ld.so.conf, the LD_LIBRARY_PATH environment variable et al., or pass appropriate rpath settings to the linker, whatever suits your needs best. Regards, Michael _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake