Boost logo

Boost Users :

Subject: Re: [Boost-users] Problems compiling those libraries that are not header only on 64 bit Windows 7
From: Ted Byers (r.ted.byers_at_[hidden])
Date: 2011-01-27 08:37:10


Thanks Lars

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Lars Viklund
Sent: January-27-11 5:57 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Problems compiling those libraries that are not
header only on 64 bit Windows 7

On Thu, Jan 27, 2011 at 12:18:17PM +0300, Vladimir Prus wrote:
>> Ted Byers wrote:
>> > I have two versions of MS VS: MS VS 2005 and MS VS 2010. I guess my
>> > first question is, "Will library files produced by MS VS 2005 work with
MS VS
>> > 2010?" I know that library files compiled by compilers from
different
>> > sources (gcc vs MSVC) won't work with each other (unless the library
>> > was written in C or FORTRAN), but does the same apply to different
>> > versions fo the same compiler?
>
>In general, the library format between VS versions is not forward or
backward compatible. This is primarily due to using different runtime
versions, but also due to that the MSIL (not the .NET IL) of .lib files is
not guaranteed to be >compatible between versions. Such IL is generated if
you have options like Link-Time Code Generation and other fancy settings.
>
>> >
>> > bjam --build-dir=C:\boost_1_45_0\lib\msvc2010\x32
>> > --build-type=complete
>> >
>> > bjam --build-dir=C:\boost_1_45_0\lib\msvc2010\x64
>> > --build-type=complete
>>
>> I am somewhat confused -- those two commands differ only in
>> --build-dir option, therefore they will build boost using the same
version of the same compiler.
>> If you with to use different versions, specify toolset=msvc-10.0 and
>> toolset=msvc-9.0 during those invocations. Also, use address-model=64
>> if you wish to build 64-bit libraries. See:
>
>I assume you mean msvc-8.0, as he says he's on 2005. Note that the build
system will completely ignore whether you're in a "Visual Studio 2010
Command Prompt" or in a "Visual Studio 2005 Command Prompt", and will also
ignore the >bitness of said command prompt environment.
>
>You need to specify toolset=msvc-x.y and address-model=zz if you want to
target a specific toolset version and bitness.

Thanks for this. I had neglected to say that the three attempts were done
in different shells with environments specific to the two versions of msvc
and cygwin. I thought I had read that bjam autodetects the right compiler,
but I guess I misunderstood that as including both the type (gcc vs msvc)
and version of the compiler.

>> You should also use --stagedir=XXX to put the final build products into
different directories.
>> --build-dir is only for specifying intermediate directory.
>
>Or --prefix=XXX if you're doing an 'install' instead of a 'stage' (stage is
default).

Would I be right in expecting I could use bjam install if the build seems to
work when I have completed it using stage?

Thanks again,

Ted


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