Boost logo

Boost-Build :

Subject: Re: [Boost-build] Question about building VS2012 mt-sgd
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2012-11-05 09:28:41


On 5.11.2012. 7:07, 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.
>
> Thanks for having this mailing list and I do hope you guys can help me
> track down what I'm doing wrong! Pouring over internet searches hasn't
> helped except to hint towards batch files that can be set up, but I'm at
> a loss on what the proper commands would be. You guys are my last hope!
>
> Thanks again and I look forward to hearing back from you!

Invoke b2 with runtime-link=static. This will produce required boost
libs (mt-s, mt-sgd). I think you can also pass --build-type=complete to
get all variants.

This is documented here:

http://www.boost.org/doc/libs/1_51_0/more/getting_started/windows.html


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