Visual studio 2017 could not find LMCONS.H - c++

Visual studio 2017 coud not compile openscad with error:
could not find LMCONS.H

Compile your project with older sdk 10.0.14393.0 indtead of 10.0.15.063 or better update your visual studio to latest version and it will compile fine.

Related

Downgrade Visual Studio 2019 back to Visual Studio 2017

There is a lot of answers related to upgrading a solution from Visual Studio 2017 to Visual Studio 2019 on StackOverflow. But how do I downgrade back to Visual Studio 2017? When I try to build a project in Visual Studio 2017 I get the following error:
Error MSB8020.
The build tools for v142 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install v142 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Before that, I used Visual Studio 2019 with the solution and it worked fine. But now I have to use Visual Studio 2017 instead and as expected I have errors. Is there a way to fix it not recreating the solution manually? Thanks for advice!
This problem is with your MSBuilder, re check the version of MSBulder in Visual Studion sometime it may be still support for vs2019.
or
You can changed this in your project
to: Project->Properties->General->Platform Tool_set and change to the current version of your VS.
Think this will be helpful.!

Runtime dependency because of visual studio minor upgrade

In my C++ project I use various open source libraries. I recently migrated from Visual Studio 2013 to Visual Studio 2017. When I migrated, the latest version of the visual studio 2017 was version 15.4.2. Hence I recompiled all the open source libraries with this version of the visual studio. Now, I see that newer version of the Visual Studio is available. If I migrate to the newer version of the Visual Studio 2017, do I have to rebuild these open source libraries again? Or can they still work seamlessly? Would there be any runtime issues?
No, it should still works fine.

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.

How to fix MSVCP120D.dll error Visual Studio 2015?

I am trying to run a C++ OpenCV 3.0 example in Visual Studio 2015 and I get a system error saying
The program can't start because MSVCP120D.dll is missing from your computer. Try reinstalling the program to fix this problem.
I have tried to reinstall Visual Studio but this does not fix the problem. Does anybody have any other solutions I could try?
The internal version of Visual Studio 2013 is 12. The DLL in question is version 12 (MSVCP120D, the D stands for Debug). You probably downloaded OpenCV compiled for Visual Studio 2013.
To use it with Visual Studio 2015 (known also as Visual C++ 14.0) you need to compile against VS 2015 or maybe find a download package pre-compiled for 2015.