
19 Jan
2010
19 Jan
'10
11:47 a.m.
Rangarajan, Kumar wrote:
export BOOST_INC=~/boost_1_41_0 export BOOST_LIBS=~/boost_1_41_0/stage/lib g++ -I $BOOST_INC first.cpp -o first -L$BOOST_LIBS - lboost_program_options
I tried it - seems to compile ok, but when I try to run the program, I get "error while loading shared libraries: libboost_program_options.so.1.41.0: cannot open shared object file: No such file or directory" But the library is there...
Try adding -R$BOOST_LIBS to the link line. This should include a runtime path to be looked when loading the library.
:-)
Hmm, from that I get g++: unrecognized option '-R/home/username/boost_1_41_0/stage/lib'... But anyway it worked with Tobias' solution now. Best, Katharina