|
Boost-Build : |
Subject: Re: [Boost-build] [cmake][findboost] Linking against Boost libraries with tagged name-layout
From: Arindam Mukherjee (arindam.mukerjee_at_[hidden])
Date: 2015-03-04 02:23:46
On Tue, Mar 3, 2015 at 10:26 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> On 03/03/2015 01:10 AM, Arindam Mukherjee wrote:
>> I am trying to use CMake (v 2.8.12.1) to generate a Visual Studio 2013
>> solution file for projects that link to Boost libraries.
>>
>> 1. I have used find_package with FindBoost to locate the Boost
>> libraries - this succeeds.
>> 2. I am defining BOOST_ALL_DYN_LINK and BOOST_AUTO_LINK_TAGGED using
>> add_definitions. The latter is being used because my Boost libraries
>> have tagged name-layout.
>> 3. I also used link_directories trying to tell Visual Studio where to
>> look for the libraries.
>>
>> I still get linker errors for unresolved symbols from these libraries.
>> Where do I need to look?
>>
>
> I don't see anything obviously wrong with your setup.
> Can you show a sample of the compile and link command
> lines that CMake generates? In particular, I'd like
> to make sure that CMake is not adding -DBOOST_ALL_NO_LIB,
> which disables auto-linking.
>
> In Christ,
> Steven Watanabe
>
Just discovered that it was a problem with an environment variable in
the build environment. It was pointing to a 32-bit build of boost
whereas it should have pointed to a 64-bit version. We were using the
generator string "Visual Studio 12 Win64" for cmake. Using "Visual
Studio 12" instead confirmed that.
Thanks,
Arindam
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk