I downloaded Boost 1.63.0 and tried building it with my newly installed Visual Studio 2017 but there is no way it works! It compiles with the Visual Studio 2015 compiler instead.
Let me be more clear. I have both Visual Studio 2015 Update 3 and Visual Studio 2017 installed in my laptop. I open a command prompt with the environment set for the 2017 compiler (which is version 15.0).
Then I execute:
b2 --layout=versioned --with-chrono
but it uses version 14.0 (toolset=msvc-14.0) instead of version 15.0...
Thanks!
Juan Dent
Related
I have recently downloaded the Visual Studio 2022 IDE. During installation, I selected "Desktop development with C++" and "MSVC v141 - VS 2017 C++ x64/x86 build tools" (as answers to similar questions had suggested). I want to compile using cmake -G "Visual Studio 15 2017 Win64" .. but get the following error:
CMake Error at CMakeLists.txt:83 (project):
Generator
Visual Studio 15 2017 Win64
could not find any instance of Visual Studio.
cmake --help returns a list of available generators (shortened for readability):
The following generators are available on this platform (* marks default):
* Visual Studio 17 2022 = Generates Visual Studio 2022 project files.
Use -A option to specify architecture.
Visual Studio 16 2019 = Generates Visual Studio 2019 project files.
Use -A option to specify architecture.
Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
Optional [arch] can be "Win64" or "ARM".
...
This output makes me think that Visual Studio 15 2017 should be available, but it is nevertheless not being found.
cmake --version returns cmake version 3.23.22060601-MSVC_2.
How could I use the Visual Studio 15 2017 generator instead of the newest Visual Studio 17 2022?
How could I use the Visual Studio 15 2017 generator instead of the newest Visual Studio 17 2022?
Answering this directly: find and install Visual Studio 2017. That's a bad solution, though.
I selected "Desktop development with C++" and "MSVC v141 - VS 2017 C++ x64/x86 build tools" (as answers to similar questions had suggested)
Ah, so you want to target MSVC v141. No problem. Use the generator for the toolchain you already have installed (VS2022) and then tell it to use the v141 toolset with the -T flag, like so:
cmake -G "Visual Studio 17 2022" -T v141 [...other args...]
I uninstalled Visual Studio 2017, then installed Visual Studio 2019.
Visual Studio 2019 doesn't compile any C# project, even if I make a completely new one, with this error:
The specified task executable location "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe" is invalid.
I can't find where this path is stored. How can I fix it?
I have installed Qt 5.14.2 using its binary from the official site. During installation I checked all the options so that nothing misses out.
(I had Visual studio professional 2019 already installed in my system with MSVC 2017)
After this I installed Visual Studio 2019 Community for MSVC 2019 by selecting the separate c++ option.
Now when I open cmake file of a qt project, qt tries to configure using msvc 2017 and during configuration it always sends me the following error...
.../.../Visual Studio 2019/professonal/msvc2017/...cl.exe was unable to execute a simple program.
How to force Qt to use MSVC 2019 to get rid of this error ?
I'm using Visual Studio 2019 and I need to install several libraries using a specific platform toolset.
Right now I have three platform toolsets intalled: Visual Studio 2015 (v140), Visual Studio 2017 (v141) and Visual Studio 2019 (v142).
Is there a way to specify the platform toolset dirung the installation of a package? By default vcpkg is using the latest tools (v142 in my case).
This works great:
vcpkg install grpc:x86-windows-static
I tried this:
vcpkg install grpc:x86-windows-static-v141
which doesn't work as expected.
You will probably need to create a new triplet the existing files are %vcpkgroot%\vcpkg\triplets and use them as reference. You will probably need to set the following cmake set from the vcpkg readme about tirplets
When I went to compile a project with CMake using MSVC++, I noticed something. CMake asked me to identify which copy of Visual Studio I wanted to use, and it presented me with the choices:
Visual C++ 2010
Visual C++ 10
Visual C# 2010
Visual C# 10
What is the difference between 2010 and 10?
The internal version number for VS2010 is version 10. Lucky coincidence. Version 11 won't be on your machine until 2012. Or later.
For creating a VS2010 project and compiling it from cmd, these are the options you could use:
cmake -G "Visual Studio 11 Win64" "%myProject%\src"
CD %HOMEDRIVE%\Windows\Microsoft.NET\Framework64\v4.0.30319
msbuild %myProject%\build\ALL_BUILD.vcxproj /detailedsummary /property:PlatformToolset=v110 /p:TargetFrameworkVersion=v4.5.1 /clp:ErrorsOnly /p:Configuration=Debug
msbuild %myProject%\build\ALL_BUILD.vcxproj /detailedsummary /property:PlatformToolset=v110 /p:TargetFrameworkVersion=v4.5.1 /clp:ErrorsOnly /p:Configuration=Release