Problem: When installing boost, “cl not found”. Or unresolved reference.
Solution: cd Microsoft Visual Studio 11.0\VC, run vcvarsall.bat amd64
. add Microsoft Visual Studio 11.0\VC\bin into environmental Path. Refer to http://www.boost.org/doc/libs/1_59_0/more/getting_started/windows.html for installation details.
Note that 32 bit and 64 bit should be treated differently when using b2.exe. For 32 bit, run b2 toolset=msvc-11.0 --build-type=complete --libdir=C:\Boost\lib\i386 stage
. For 64 bit, run b2 toolset=msvc-11.0 --build-type=complete --libdir=C:\Boost\lib\x64 architecture=x86 address-model=64 stage
.
To put it simple, download binary files from http://sourceforge.net/projects/boost/files/boost-binaries/. Boost is auto-link which means you don’t need to add all lib files manually.
If you have installed boost, using it in a VC project just takes two steps:
C/C++->General: Additional Include Directories D:\Program_Files\boost_1_59_0_binary\boost;
Linker->General: Additional Library Directories D:\Program_Files\boost_1_59_0_binary\lib64-msvc-11.0;
Add D:\Program_Files\boost_1_59_0_binary\lib64-msvc-11.0 in the environmental variable Path.
Notes:
- x64 and x86 conflicts: Linker->advanced->target machine
- build->configuration manager