build 64 bit boost lib
40down voteaccepted
As a short answer:
bjam --toolset=msvc-9.0 address-model=64 --build-type=complete
As a longer answer, here are my build notes for having VS .NET 2008 32-bit and 64-bit boost libraries in the same hierarchy (which is I suspect a common use case):
-
Build the win32 binaries
bjam --toolset=msvc-9.0 --build-type=complete stage
-
Create the directory lib\win32
- Move the contents of stage\lib to lib\win32
- Remove the directories bin.v2 and stage
-
Build the x64 binaries
bjam --toolset=msvc-9.0 address-model=64 --build-type=complete stage
-
Create the directory lib\x64
- Move the contents of stage\lib to lib\x64
- Remove the directories bin.v2 and stage
answered Feb 24 '10 at 14:01
Adrian Conlon
1,28457
7
You can specify the stage directory as well, which removes the need to copy the resulting libraries around: bjam --toolset=msvc-9.0 address-model=64 --build-type=complete --stagedir=lib\x64 stage – hkaiser Feb 24 '10 at 14:05
@hkaiser When I tried that the libraries ended up in lib\x64\lib
. – Tim Sylvester Jun 29 '10 at 17:19
1
what is stage? – Nasgul Aug 19 '10 at 23:02
1
+45 for best answer on the intertubes – John Dibling Jan 12 '11 at 19:58
1
Unfortunately to build 64, address-model=64 doesn't work. You need to have your path pointing to Visual Studio \bin\amd64\cl.exe. Otherwise it builds 32 bit version. To do this you can start Microsoft SDK Command prompt and use "setenv /Release /x64" which redefines all the paths. – Budric Dec 13 '11 at 16:59