|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
boost programmer_option.hppHi,
i was trying to use boost program option I can compile the code written using the program_option.hpp, but i am getting linker error can any one help me? Using gcc compiler _______________________________________________ Boost-users mailing list Boost-users@... http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
|
Re: boost programmer_option.hppNarendra R wrote:
> boost program option > linker error > Using gcc compiler Are you linking with -lboost_program_options? Markus _______________________________________________ Boost-users mailing list Boost-users@... http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
|
|
|
|
Re: boost programmer_option.hppOn Friday 10 July 2009 01:28:44 Narendra R wrote:
> I tried to link like this > g++ -I /home/narendra/boost_instal/boost_1_39_0 test.cpp -o test -L > /home/narendra/boost_instal/boost_1_39_0/stage/lib > -l/home/narendra/boost_instal/boost_1_39_0/stage/lib/libboost_program_optio >ns-gcc41-mt-1_39.a The '-l' is not required when explicitly specifying the whole library. So, you would use one of the following. Replace $INS with /home/narendra/boost_instal/boost_1_39_0 in the code below. Option 1: g++ -I$INS test.cpp -o test $INS/libboost_program_options-gcc41-mt-1_39.a Option 2: g++ -I$INS test.cpp -o test -L $INS/stage/lib -lboost_program_options-gcc41- mt-1_39 In option 2, depending on whether you use static linking or dynamic linking, you may want to set LD_LIBRARY_PATH before running the example. Regards, Ravi _______________________________________________ Boost-users mailing list Boost-users@... http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |