Boost logo

Boost Users :

Subject: Re: [Boost-users] boost build and link problems
From: Lars Viklund (zao_at_[hidden])
Date: 2011-06-10 02:29:29


On Thu, Jun 09, 2011 at 10:55:13PM -0600, Littlefield, Tyler wrote:
> >So you have managed to build bjam (maybe you just needed to run
> >VCVARSALL.BAT on your command line)?
> Hello:
> I tried that, and it is still building the vc100 library files.
> thanks,
> On 6/9/2011 9:53 PM, liamv7 wrote:
>> On 10 June 2011 12:40, Littlefield, Tyler<tyler_at_[hidden]> wrote:
>>> Hello all:
>>> I'm trying to use boost::asio in an app. I used the bootstrap.bat and then bjam to build and configure boost. I use the visual studio 2008 command prompt because when I run bootstrap.bat from the normal command prompt, I get:
>>>
>>> cl.exe - System Error
>>> The program can't start because mspdb100.dll is missing from your
>>> computer. Try reinstalling the program to fix this problem.
>>> the build is building vc100 libs, but when I try to build my app it's trying to link to vc90 libs. I am using 2008, so I am confused as to why this is working out to build vc100 libs. When I build:
>>> 1>LINK : fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_46_1.lib'
>>> so it looks like it's trying to link to vc90 libs when vc100 are all that's being built. Is there a way to get rid of this and build for vs 2008?
>> So you have managed to build bjam (maybe you just needed to run
>> VCVARSALL.BAT on your command line)?
>>
>> To build the correct libraries you need to specify the toolset on the
>> bjam command line: --toolset=msvc-9.0
>> see http://www.boost.org/doc/libs/1_46_1/more/getting_started/windows.html#identify-your-toolset

Do note that there's no -- before the toolset parameter, and that bjam
completely ignores most of the environment it's in, particularly the
flavor of command prompt you're in and which vcvars you might have
invoked.

It accurately detects through the registry and other shenanigans which
compiler versions you've got installed and exposes them properly through
the toolset parameter, which you use like:

bjam toolset=msvc-9.0

This has many fine benfits, like being able to build for multiple
address models at the same time, as well as being able to target
multiple toolsets easily in batch files, simply through invoking bjam
with different toolset= parameters.

And please, do not top-post, and try to strip down the massive
multi-line sig.

-- 
Lars Viklund | zao_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net