Boost logo

Boost-Build :

Subject: Re: [Boost-build] Question about building VS2012 mt-sgd
From: Jeff Flinn (Jeffrey.Flinn_at_[hidden])
Date: 2012-11-05 07:29:38


On 11/5/2012 1:07 AM, Charles Clark wrote:
> Hello,
>
> I had this working years ago, but have since had to upgrade to Visual
> Studio 2012 and have run into problems getting boost's thread libraries
> built and linking properly. When I run the recommended command line of
> "bootstrap" and ".\b2", it generates the following files for me:
> libboost_thread-vc110-mt-1_51.lib
> libboost_thread-vc110-mt-gd-1_51.lib
>
> I've updated Visual Studio's additional include directories to point to
> this. However, when building Visual Studio, I get the following error
> in each configuration.
> Debug:
> LINK : fatal error LNK1104: cannot open file
> 'libboost_thread-vc110-mt-sgd-1_51.lib'
> Release:
> LINK : fatal error LNK1104: cannot open file
> 'libboost_thread-vc110-mt-s-1_51.lib'
>
> Do you know why it might be linking to the 's' version of the
> libraries? How can I build these versions, or, how can I set up Visual
> Studio to be linking to the non 's' versions?
>
> If it helps, my output configuration type is an exe for this project
> file and my Runtime Library is /MT and /MTd. This application links to
> other static lib's that run some lower level engine code. The project
> using boost however is not a static lib.

/MT and /MTd specify static run time library builds, hence the 's'. You
need to specify runtime-link=static on the b2 command line.

Jeff


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