[CMake] Linking with MSVC against Boost lib fails to find library

Stephen Collyer scollyer at netspinner.co.uk
Fri Jul 11 07:33:57 EDT 2008


I'm getting a link failure under Visual Studio with Boost.
The installed Boost library in question is:

boost_program_options-vc80-mt-gd-1_34_1.lib

In my CMakeLists.txt file, I refer to this lib via

${BOOST_PROGRAM_OPTIONS_LIBRARY}

However, the link fails with a message telling me that VS
can't find:

libboost_program_options-vc80-mt-gd-1_34_1.lib

i.e. with a leading "lib".

The link command generated by VS does *not* have this leading
"lib" and refers to the correct library name so I'm confused as
to why VS is looking for the incorrect library, when it actually
performs the link.

Can anyone suggest what I'm doing wrong ?

-- 
Regards

Steve Collyer
Netspinner Ltd


More information about the CMake mailing list