2012/3/15 Pervez, Salman <Salman.Pervez@citadelgroup.com>

/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