Boost logo

Boost Users :

Subject: Re: [Boost-users] boost error
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2012-03-16 18:01:05


2012/3/15 Pervez, Salman <Salman.Pervez_at_[hidden]>

> /usr/bin/ld: cannot find -lboost_program_options****
>
> collect2: ld returned 1 exit status****
>
> Thanks Kris, that should be the correct solution, except it doesn’t fix
> the problem entirely. Here is my boost/ilb directory which I pass with the
> –L flag…****
>
> **
>
[...]

>
> /boost/1.44.0/lib/libboost_program_options-gcc41-1_44.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-1_44.so****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-1_44.so.1.44.0****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.so****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-d-1_44.so.1.44.0****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-d.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-d.so****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.so****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-1_44.so.1.44.0****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.so****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-d-1_44.so.1.44.0****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-d.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt-d.so****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41-mt.so****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41.a****
>
> /boost/1.44.0/lib/libboost_program_options-gcc41.so****
>
> ** **
>
> And even though I tell it where to look, it does not find
> -lboost_program_options. So I am wondering if this is a version mismatch?
> Or if the source code for the application needs to be changed?****
>
> ** **
>
> Salman
>

I believe you need to try something like -lboost_program_options-gcc41-mt,
i.e. the filename without the "lib" prefix and ".a" suffix.

If you don't want b2 to add the gcc* suffixes to lib names, take a look at
the --layout option ;-)

Kris



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net