Linking fails to Boost_system (cannot open shared object file: No such file or directory)
Hi all, I have linked my simple program that uses boost.filesystem as follows: accesstimer: acctime.o bentimer.o g++ -L/usr/local/boost/boost_1_39_0/stage/lib -lboost_system-gcc41-mt -lboost_filesystem-gcc41-mt acctime.o bentimer.o -o accesstimer acctime.o: acctime.cpp bentimer.h g++ -I /usr/local/boost/boost_1_39_0 -c acctime.cpp bentimer.o: bentimer.cpp bentimer.h g++ -c bentimer.cpp This compiles fine, but when I execute I get the following error: ./accesstimer: error while loading shared libraries: libboost_system-gcc41-mt-1_39.so.1.39.0: cannot open shared object file: No such file or directory I have looked in the .../stage/lib directory and the file does exist there. Can anyone see what I've done wrong? thanks -- View this message in context: http://www.nabble.com/Linking-fails-to-Boost_system-%28cannot-open-shared-ob... Sent from the Boost - Users mailing list archive at Nabble.com.
The answer for me, hopefully it'll help someone else was as follows: I was having problems linking, I was still getting: ./accesstimer: error while loading shared libraries: libboost_system-gcc41-mt-1_39.so.1.39.0: cannot open shared object file: No such file or directory But my maklefile seemed to be correct, the solution was to just execute: ldconfig On my Linux machine that I had just installed Boost on and built the filesytem libraries. I am assuning that ldconfig needed to be run for my system to pick up the new libraries I had installed. It now works. -- View this message in context: http://www.nabble.com/Linking-fails-to-Boost_system-%28cannot-open-shared-ob... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (1)
-
stationx