« Return to Thread: boost programmer_option.hpp

Re: boost programmer_option.hpp

by Ravi-41 :: Rate this Message:

Reply to Author | View in Thread

On 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

 « Return to Thread: boost programmer_option.hpp