Boost logo

Boost Users :

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


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

boost-users_at_[hidden] spake the secret code
<CA+b9djfYmQpoHc0bX2E==SnqZkq_u1ROW0v6+tJPuiUHiVuxig_at_[hidden]> thusly:

>On Sat, Jun 29, 2013 at 2:42 AM, Richard
><legalize+jeeves_at_[hidden]>wrote:
>
>> Have you verified that your project was built x64?
>
>My project in indeed in x64. When I compile it in x86, I am able to link
>with the Boost.Test library that is supposed to be x64.

It sounds like auto linking of the library is picking up the wrong one.
Auto-linking uses #pragma comment(lib, <name>) to specify the library
name needed for linking. It doesn't specify a directory location for
the library, only its name.

Do you have your library search path set to the location of the x64
libraries?

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)
etc.

(Mine is 1.54 because I'm building from trunk; yours would be 1.53.)
Launch a VS2012 x64 Native Tools Command Prompt window to get dumpbin
in your path.

Between x86 and x64, the library files have the same name, so they have
to be kept in different directories. b2 stage just puts the output
products in stage/lib regardless of the address-type setting, so if you
build both x86 and x64, then whichever one was built last overwrites
the one that was built first.

-- 
"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