How to build boost Version 1.58.0 using Visual Studio 2015 (Enterprise)
I Tried to install Qt and I had the same issue: vcvarsall.bat was missing.
In my case the problem was that I unchecked The Visual C++ Common Tools.
I modified my VS 2015 installation and added the missing feature Common Tools for Visual C++ 2015:
After the modification, the File is in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
Building boost for different versions of Visual Studio
adding toolset=msvc-14.2
to the b2.exe builds the correct version.
b2.exe install --prefix=MY_PATH toolset=msvc-14.2
How to build boost 1.63 for both visual studio 2015 and 2013 (to have vc120 and vc140 libs)?
The thing worked with prebuilt binaries
Thank you, @Hans!
Boost build a new version with VS 2019
Boost library file names describe what they support and how they were built. In your case they support multithreading and were built with VS2019 (as opposed to MinGw, Clang or an earlier version of visual studio). For more information see: how can i decode boost library naming.
boost
uses auto linking with visual studio
, see how boost auto linking makes choice, so the library file names must match those that are required.
You haven't said why you want to "remove the mt and the toolset from the lib and dlls".
If it is to get boost
to link with an existing project, then you'll need to build boost
with the correct version of visual studio and without multi-threading, e.g.:
b2 toolset=msvc-??? threading=single ...
See: b2 invocation properties.
Unknown compiler version while compiling Boost with MSVC 14.0 (VS 2015)
Latest (at the time of posting this answer) Boost 1.58 does support MSVC 14.0 Preview which was the latest MS compiler at the time of Boost 1.58 release.
Now, the latest version of Visual Studio is 2015 RC which isn't covered in the boost 1.58 config file.
To stop Boost 1.58 complaining about unknown compiler version edit boost/config/compiler/visualc.hpp
and replace:
// last known and checked version is 19.00.22129 (VC14 Preview):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022310)
with:
// last known and checked version is 19.00.22816 (VC++ 2015 RC):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022816)
which you can find is already done in boost repo here for upcoming Boost 1.59 release.
Update: For Visual Studio 2015 RTM set it to:
// last known and checked version is 19.00.23026 (VC++ 2015):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190023026)
Update2: For Visual Studio 2015 Update 1 set it to:
// last known and checked version is 19.00.23506 (VC++ 2015 Update 1):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190023506)
Also if you have previously been running Boost.Build on toolset=msvc-14.0
then delete from C:\Users\<name>\AppData\Local\Temp
the following cached files:
b2_msvc_14.0_vcvarsall_x86.cmd
b2_msvc_14.0_vcvarsall_x86_amd64.cmd
b2_msvc_14.0_vcvarsall_x86_arm.cmd
More about that here.
Update3
For future reference, in your Visual Studio Tools Command Prompt run the command cl /Bv
to see your version numbers (the parameters are case sensitive).
Mine outputs the following:
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe: Version 19.11.25506.0
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\c1.dll: Version 19.11.25506.0
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\c1xx.dll: Version 19.11.25506.0
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\c2.dll: Version 19.11.25506.0
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\link.exe: Version 14.11.25506.0
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\mspdb140.dll: Version 14.11.25506.0
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\1033\clui.dll: Version 19.11.25506.0
From this you can deduce the _MSC_VER
is 1911 (from the text "Version 19.11") and the _MSC_FULL_VER
is 191125506.
Related Topics
Can Branches with Undefined Behavior Be Assumed Unreachable and Optimized as Dead Code
How to Enable_Shared_From_This of Both Parent and Derived
How to Use Multiple Versions of Gcc
Difference Between A* Pa = New A; and A* Pa = New A();
How to Call Memcpy() and Memmove() with "Number of Bytes" Set to Zero
Segfaults in Malloc() and Malloc_Consolidate()
C++ Template Metaprogramming - How to Output the Generated Code
Why Does the Main Function Work with No Return Value
Fastest Way to Get the Integer Part of Sqrt(N)
How to Track Memory Allocations in C++ (Especially New/Delete)
Relative Paths Not Working in Xcode C++
How to Take Screenshot in Opengl
Std::Back_Inserter for a Std::Set
How to Check If a Key Is Pressed on C++
Should the Copy-And-Swap Idiom Become the Copy-And-Move Idiom in C++11