boost programmer_option.hpp

View: New views
5 Messages — Rating Filter:   Alert me  

boost programmer_option.hpp

by Narendra R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
    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.hpp

by Markus Raab-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Narendra 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

Parent Message unknown Re: boost programmer_option.hpp

by Narendra R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi Markus ,
 
     Steeps i have done is
          1. downloaded boost library  boost_1_39_0
          2. build the program.option using bootstrap.sh --without-libraries=program_options --libdir=/home/narendra/boost_instal/boost_1_39_0/b_lib_ins
          where /home/narendra/boost_instal is the directory where i have stored boost library
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_options-gcc41-mt-1_39.a

 

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: boost programmer_option.hpp

by Ravi-41 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Parent Message unknown Re: boost programmer_option.hpp

by Narendra R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thx ravi,
           I got to know and it working.
          I was not knowing that -l is for searching the lib object -L for lib path or for linking object.
Thanks one again

------------------------------

Message: 4
Date: Sat, 11 Jul 2009 11:03:20 -0400
From: Ravi <lists_ravi@...>
Subject: Re: [Boost-users] boost programmer_option.hpp
To: boost-users@...
Message-ID: <200907111103.20188.lists_ravi@...>
Content-Type: Text/Plain;  charset="iso-8859-15"

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



------------------------------

Message: 5
Date: Sat, 11 Jul 2009 11:08:52 -0400
From: Ravi <lists_ravi@...>
Subject: Re: [Boost-users] Boost Python is slow?
To: boost-users@...
Message-ID: <200907111108.52321.lists_ravi@...>
Content-Type: Text/Plain;  charset="iso-8859-1"

On Thursday 09 July 2009 05:00:47 Tyomich on the AIR wrote:
> And then when I use a simple function which just increments the x member of
> every object, this function takes about 4 seconds to process the whole list
> (1000000 items) of Boost-wrapped objects and less than a second to process
> objects of my own wrapping! How this can be possible? Is Boost.Python much
> more slower than Python itself?

Boost.Python is a little slower than wrapping directly using Python C-API,
especially in very simple cases like yours. (It is a variant of the
abstraction penalty.) However, it is hard to believe that it is 4x slower.
Would you mind posting complete compilable examples so that we can take a look
at it?

Regards,
Ravi




_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users