Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Test on Windows x64
From: Richard (legalize+jeeves_at_[hidden])
Date: 2013-06-30 16:48:15


[Please do not mail me a copy of your followup]

boost-users_at_[hidden] spake the secret code
<CA+b9djc_upEVQ5sh6to9eLttdDJcdyqy8Fn9smu3Ao_sjSoNwQ_at_[hidden]> thusly:

>> You can verify the library is x64 with dumpbin:
>>
>> D:\Code\boost\boost-trunk\stage\lib>dumpbin /all
>> libboost_unit_test_framework-vc110-mt-gd-1_54.lib |find /i "machine"
>> 8664 machine (x64)
>> 8664 machine (x64)
>> 8664 machine (x64)
>>
>
>This is interesting, thanks for the tip. I checked with dumpbin and all the
>library are actually x86 binaries.

OK, then we're back to a build problem. I started with a fresh boost
1.53.0 zip file and did this:

D:\Code\boost\boost_1_53_0>.\b2 --with-test address-model=64

That got me the following in stage\lib:

D:\Code\boost\boost_1_53_0>dir stage\lib/b
libboost_prg_exec_monitor-vc110-mt-1_53.lib
libboost_prg_exec_monitor-vc110-mt-gd-1_53.lib
libboost_test_exec_monitor-vc110-mt-1_53.lib
libboost_test_exec_monitor-vc110-mt-gd-1_53.lib
libboost_unit_test_framework-vc110-mt-1_53.lib
libboost_unit_test_framework-vc110-mt-gd-1_53.lib

I definitely got x64 libraries:

D:\Code\boost\boost_1_53_0\stage\lib>dumpbin /all
libboost_unit_test_framework-v
c110-mt-gd-1_53.lib | find /i "machine"
            8664 machine (x64)
                        8664 machine (x64)
etc.

>Are you also using VS2012?

Yes, that is the only compiler I have installed.

Verify that you are running the x64 compiler:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

Note that they are the same command (cl.exe). Boost should find your
toolset automatically and use the right path and environment variables
to find it. However, if you have explicitly set your path to include
the x86 tools, it may end up using that one instead.

If b2 address-model=64 gets you x86 binaries, then the wrong compiler
is being used. Try unsetting your path, lib, include, etc.,
environment variables, running .\b2 again and then check the built
libraries.

None of this should be specific to boost.test either, but I didn't
examine all it's bjam files to see exactly what it does to build
libraries.

-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

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