How to get compiler version 19.0.24234 for Visual Studio 2015 Update 3? - c++

When researching on libmdbx, I found its sources require MSVC compiler version >= 19.0.24234 for "Visual Studio 2015 Update 3".
I have to stick to Visual Studio 2015 Update 3, cannot upgrade to Visual Studio 2017 or later. But my compiler version is 19.00.24223.
It seems that if you install the Visual Studio 2015 Update 3 freshly from an offline ISO, the initial compiler version would be 19.00.24215.1. (ref: Offline install ISO)
Then if you install this update (KB4020481), the compiler version is bumped to 19.00.24223
I installed this update (KB3165756), the compiler version did not change.
There is a page listing all _MSC_VER_FULL values:
https://dev.to/yumetodo/list-of-mscver-and-mscfullver-8nd
The version number for 2015 Update 3 is 190024210.
So is 190024234 really a valid compiler version from Visual Studio 2015 Update 3? Or is it actually from Visual Studio 2017?
If you search google with "_MSC_FULL_VER 190024234", you will get very few results, with top ones being the github sources from user erthink, where happnes to be the repo of libmdbx. In the source it claims that 19.00.24234 corresponds to Visual Studio 2015. So is there any "KB" update that can bump the compiler versio to that required one? Thanks.
# if _MSC_FULL_VER < 190024234
/* Actually libmdbx was not tested with compilers older than 19.00.24234 (Visual Studio 2015 Update 3).
* But you could remove this #error and try to continue at your own risk.
* In such case please don't rise up an issues related ONLY to old compilers.
*/
# error "At least \"Microsoft C/C++ Compiler\" version 19.00.24234 (Visual Studio 2015 Update 3) is required."
# endif

Related

differences between Visual Studio version 15.0 and 15.x

Since the very beginning of the release of Visual Studio 2017, it seems there has been two differentiated branches:
- 15.0
- 15.x
In the above link you can see that 15.0.0 and 15.1 Preview 1 were released the same day, and then there were updates for 15.0 and 15.x. At the date of this question, latest versions are 15.0.21 and 15.9.11
What are the differences between these two development branches?
In general Microsoft offers a dual support model for most of these tools:
Stay on RTM/RTW. Basically the 15.0.x version. This version will receive hotfixes, but no feature improvements and is a Long-Term-Support version. This version is generally only available through Visual Studio subscriptions and can only be downloaded from https://my.visualstudio.com.
Stay on the latest version. Basically the 15.x.x version. This version will receive hotfixes and feature updates at a regular interval until the next major version (2019) is released. Support is normally only given on the latest update version, so if you have issues, you're likely going to be asked to upgrade to the latest 15.x.x version to see if the issue persists.
The same applies to Azure DevOps Server / Team Foundation Server.
Release notes for Visual Studio 2017 15.9.x can be found here.
Release notes for Visual Studio 2017 15.8.x can be found here.
Release notes for Visual Studio 2017 15.7.x can be found here.
Release notes for Visual Studio 2017 15.6.x can be found here.
Release notes for Visual Studio 2017 15.5.x can be found here.
Release notes for Visual Studio 2017 15.4.x can be found here.
Release notes for Visual Studio 2017 15.3.x can be found here.
Release notes for Visual Studio 2017 15.2.x can be found here.
Release notes for Visual Studio 2017 15.1.x can be found here.
Release notes for Visual Studio 2017 15.0.x can be found here.
In general you get more features, improvements and fixes in the 15.x.x version. But you may have to upgrade your solution from time to time to stay current with the tooling.
You get fewer impacting changes and a longer support window by staying on 15.0.x.

CUDA: Triple Angle Brackets gives me an error in Visual Studio [duplicate]

I'm trying to install CUDA, but I get a message saying "No supported version of visual studio was found". I think that this is because I am using Visual Studio 2017 (Community), and CUDA currently only supports up to Visual Studio 2015. Unfortunately, Microsoft will not allow me to download old versions of Visual Studio without paying a subscription fee.
Is there a way I can get around the compatibility issue with VS 2017, or can I not use CUDA?
If you want to install CUDA 8.0 with Visual Studio 2017 you need to install additional components for Visual Studio 2017.Click on the Start Menu and type Visual Studio Installer. Open Visual Studio InstallerOpen Individual components tab and select VC++ 2015.3 v140 toolset
under Compilers, build tools and runtimes.
You also need to install .NET Framework 3.5 if you didn't have it installed. Nvda.Build.CudaTasks.v8.0.dll assembly dependents on MS .NET Framework 3.5.
Open Classical Control Panel, go to Programs and features and press Turn Windows features on or off. Check .NET Framework 3.5 and press OK.
Download full CUDA toolkit distribution and extract it somewhere on your disk.
If you didn't have CUDA toolkit installed, do it now. If you have only Visual Studio 2017 installed, unselect Visual Studio integration checkbox.
Now you want to receive the "No supported version of the visual studio was found" error.
But in order to successfully build Cuda toolkit projects in Visual Studio 2017, you also need to follow steps 5 and 6.
Go to the CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions folder in your extracted distribution, copy all the files and paste them to C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\BuildCustomizations:
In the last step, you will need to edit your Cuda projects to recognize NVidia's build tasks from Visual Studio 2017. Open your .vcxproj file in a text editor and find all occurrences of CUDA 8.0.props. Replace the macro at the beginning of the string with $(VCTargetsPath14) so that XML snippet would look as follows:
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath14)\BuildCustomizations\CUDA 8.0.props" /></ImportGroup>
Don't forget to edit the custom targets path at the end of the file:
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath14)\BuildCustomizations\CUDA 8.0.targets" /></ImportGroup>
Make sure to double check your path conifuration!
If you use nvcc from command prompt you might not be calling cl.exe from Visual Studio folder!
Now you can build your Cuda project from Visual Studio 2017.
Parts of this solution are from Oleg Tarasov blog.
At the moment, Microsoft still seems to be making VS2015 Update 2 community edition available. You have to join the "dev essentials" program, but it seems to be free.
I was able to download the installer from here recently.
Update: CUDA 9 RC was made available yesterday at developer.nvidia.com to registered developers, and it has support for VS 2017.
Thank you everyone for your help. I just wanted to supplement this post with the last pieces of the puzzle. CUDA v9.0 RC is looking for VS2017 to identify as 1910 but the latest update actually identifies as 1911. To fix open .../CUDA/v9.0/include/crt/host_config.h and change this line:
#if _MSC_VER < 1600 || _MSC_VER > 1910
to this:
#if _MSC_VER < 1600 || _MSC_VER > 1911
You may also have to add the following to your CMakeLists:
list(APPEND CUDA_NVCC_FLAGS --cl-version=2017)
For people seeing this latter.
First, try to just install CUDA 10 (CUDA Toolkit 10.0).
If it still doesn't work without any mods make sure that you have as many VC++ toolsets as you see on the list. Check out this video, stop at 8:41 and compare the lists.
If for some reason you have to use CUDA 9.0 - 9.2 you will need to jump some hoops:
For cmd builds set vcvars_ver=14.11 - see this answer
For IDE builds set Platform Toolset (in project properties - General) to
Visual Studio 2017 (v141)) or
Visual Studio 2015 (v140))
If you have very customized cmd based build, hunt #if _MSC_VER (in .../CUDA/.../include/crt/host_config.h) and remove trailing || _MSC_VER > ...
In order to get working Cuda compiler nvcc in windows shell you need to do following
install proper toolset version from individual component for VS 2017 - VC++ 2017 version 15.4 v.14.11 toolset
Run in windows shell following "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.11
You can compile nvcc code without errors from windows shell
I ran into the same issue using CUDA 9.1 and VS2017 Enterprise.
After changing the VC++ compiler to v140 (instead of 141) everything runs fine.
Already had flags
#if _MSC_VER < 1600 || _MSC_VER > 1911
But it wouldn't stop showing the error.
No idea why, but trying to run it on VS2015 lead to errors about v141 not being installed... so because of some twisted logic I tried to not use v141 where it was installed... and everything worked!!
Leaving this here as it may help someone else in the same situation. (although I really don't understand the why, how, when, who or what of the solution.
Latest update (correct as of 06/12/2018) latest Cuda version is 9.2 and latest Visual Studio version is 2017.7 do NOT work together. The instructions provided in solution above don't work. Here is what worked for me:
Uninstall Visual Studio.
Uninstall Visual Studio Installer
Download Visual Studio 2017.6 (note that Microsoft is known to change links and revisions without notice) https://learn.microsoft.com/en-us/visualstudio/productinfo/installing-an-earlier-release-of-vs2017
Launch installer
Go to Individual Components. Click on Windows 10 SDK 10.0.15063
enter image description here
Download cuda Toolkit from the official website: https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal
You may need to download patch.
I wanted to edit my CUDA programs using a text editor (i.e. Sublime) and compile them from the command prompt but I ran into an nvcc compiler error. I installed Visual Studio 2017 with Windows 10 OS but after compiling, it said "only version of VS 2012, 13, 15 and 17 are allowed." So what I did was to intall VC++ 2015 toolkit from the installation package of the VS 2017 installer (refer to the image of the top post). I didnt go through his entire process instead, I only copied the path of my cl.exe file from the newly created VS 14.0 folder to the environment variable. The .exe can be found here:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
Hope this helps!
Just as update. My compatibility is:
Cuda version 11.2
Visual Studio Community 2019

MSVC2012 with Visual Studio 2017

How can I install MSVC 2012 compiler having only Visual Studio 2017?
I tried installing from this link, but it is issuing an error:
0x81f40001 - A valid Visual Studio installation was not found.
I need MSVC 2012 due to compatibility with a lib we are using.
As of July 10th 2017, Visual Studio 2012 is no longer available for download without an MSDN subscription. If you install VS2012, you can choose the "Visual Studio 2012 (v110)" on Visual Studio 2012/2017 from [Project] - [Properties] - [General] - [Platform Toolset]. Make sure you select your C++ project first.

Compiling using MSBuild 12.0 from Microsoft Visual Studio 2015

I have a solution that was compiled with MSVC 12.0 Visual Studio 2013 (C++/CLI and C#) but only have Visual Studio 2015 (Community). I want to build the project using MSVC 12.0 as it was intended, as I only need to rebuild 1 part of the solution (of 5) for my purpose and want it to be compatible with the other DLLs. When trying to build it from MSVC 14.0 (Visual Studio 2015) it says:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found.
Of course I installed the MS Build tools for 2013 (MSVC 12.0, v120) from here: https://www.microsoft.com/en-us/download/details.aspx?id=40760 as well as the Microsoft Visual C++ Redistributable 2013 package.
And the right directory for the 12.0 build tools install is C:\Program Files (x86)\MSBuild\12.0\Bin\amd64
It looks like a configuration error on the solution (or in Visual Studio in general) since it is looking for the build tools in the wrong directory. Does anyone know what settings I need to change / add in Visual Studio to get it to compile with MSBuild 12.0 instead of 14.0? I'd prefer not to install Visual Studio 2013 since I don't use it for anything else (just want to have the option to use VS 2013 MSBUILD within VS 2015 as needed).
Okay I have gotten this working although in a roundabout way. Thanks others that have answered and commented. Sign up for a Microsoft Visual Studio Dev Essentials subscription for free. https://azure.microsoft.com/en-us/pricing/member-offers/vs-dev-essentials/ Then you can go through the menus and download Visual Studio Community 2013 by going to this link and finding it https://my.visualstudio.com/downloads. After doing so, you can build MSVC 12.0 from Visual Studio 2015. Sure, not perfect, but it works. I haven't tried uninstalling Visual Studio 2013 to see if it still works (Windows Phone SDK 8.1 is installed with 2013 as was mentioned to get it working in the Enterprise version of 2015) but if you could somehow keep that and remove the 2013 edition I believe it could work without 2013 installed...
If you go to the top of your .vcxproj change it to this
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Then your .sln can still open in Visual Studio 2015
VisualStudioVersion = 14.0.25420.1
The reason is because the compiler version is specified on a project-by-project basis, and will override the solution version.
I'd prefer not to install Visual Studio 2013 since I don't use it for anything else (just want to have the option to use VS 2013 MSBUILD within VS 2015 as needed).
You can install VS2013 toolset version from your VS2015 installer without installing visual studio 2013. From the 2015 installer, select Windows 8.1 and Windows Phone 8.0/8.1 Tools and common Tools for Visual C++ 2015:
After installation completed, you will find the platform Toolset below:
Then you can built your project with platform toolset Visual Studio 2013(v120).
You can refer to more info from the similar question on SO.

Is it possible to apply fixes on Visual C++ Build Tools 2015 Update 3

Visual Studio 2015u3 is serviced by cumulative updates with KB3165756, which contains, among other things, fixes to the C++ compiler and libraries.
However KB3165756 refuses to do anything on a computer where Visual C++ Build Tools 2015 Update 3 is installed. It really wants one of VS Pro, Enterprise, Community or Express.
Are there special patches for Visual C++ Build Tools, or is it not updated at all and so it is actually a better idea to switch to Visual Studio Express 2015 for Desktop, in order to be able to receive patches?
Here is the answer I got on MSDN Visual Studio Development > Visual Studio Setup and Installation forum:
However KB3165756 refuses to do anything on a computer where Visual C++ Build Tools 2015 Update 3 is installed. It really wants one of VS Pro, Enterprise, Community or Express.
It is reasonable, check this: https://msdn.microsoft.com/en-us/library/mt752379.aspx and it describes this update is applies to
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Visual Studio Community 2015
Visual Studio Express 2015 for Web
Visual Studio Express 2015 for Desktop
Visual Studio Express 2015 for Windows 10
I have researched around and it looks like there is no special update for the Visual C++ Build Tools 2015, and refer to this blog: https://blogs.msdn.microsoft.com/vcblog/2015/11/02/announcing-visual-c-build-tools-2015-standalone-c-tools-for-build-environments/
The latest release of the Visual C++ Build Tools 2015 is here: Download Visual C++ Build Tools 2015
If you still want to install, it looks like you need a VS 2015 RTM update version on your computer. Since the VS community 2015 with update 2 and Visual Studio Express version are free and you can think about it.
Best regards,
Sara