I've built the x86 Boost libraries many times, but I can't seem to build x64 libraries. I start the "Visual Studio 2005 x64 Cross Tools Command Prompt" and run my usual build:
bjam --toolset=msvc --build-type=complete --build-dir=c:\build install
But it still produces x86 .lib files (I verified this with dumpbin /headers). What am I doing wrong?
You need to add the
address-model=64
parameter.Look e.g. here.
You may find following Boost.Build property:
The accepted answer is correct. Adding this in case somebody else googles this answer and still fails to produce x64 version.
Following is what I had to do to build Boost 1.63 on VS 15 2017 Community Edition.
Commands executed from VS environment cmd shell. Tools -> Visual Studio Command Prompt
You can verify that the resulting .lib is x64 with dumpbin: