Using MSVC10 Libraries with MVSC11 - c++

Is there a way to be able to use Visual Studio 2010 libraries with the Visual Studio 2012 Toolset? My project uses freeware libraries that currently are only built with MSVC9 & MSVC10.
I'm already familiar with the Properties->General->Platform Toolset option, but would like to keep it on Visual Studio 2012 (v110) if possible.

Related

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.

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.

What is the difference between vc10, vc11 and vc12 libraries in OpenCV?

I am using OpenCV 2.4.11 and I have 2 folders x64 and x86 both containing vc10, vc11 and vc12 folders, each containing lib folders with the libraries. The libraries look pretty much the same in all folders, with some small differences in size. Firstly, what is the difference between the x64 and x86 folders? Secondly, what is the difference between the vc10, vc11 and vc12 libraries?
They are different builds for each version of Microsoft's Visual Studio compiler.
vc17: The compiler packaged with Visual Studio 2022
vc16: The compiler packaged with Visual Studio 2019
vc15: The compiler packaged with Visual Studio 2017
vc14: The compiler packaged with Visual Studio 2015
vc12: The compiler packaged with Visual Studio 2013
vc11: The compiler packaged with Visual Studio 2012
vc10: The compiler packaged with Visual Studio 2010
It refers to Visual C++ version used for the build. x64 and x86 is the chip architecture 64 vs 32 bit.
It refers to MS Visual Studio version https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History.

How to install one version of visual studio 2013 with c++ 2010, 2012 and 2013 toolsets

How can I install visual studio 2013 with c++ 2010, 2012 and 2013 toolsets without installing any other visual studio versions (express or any other versions).
I need this so that I can keep my pc light and clean. Are there any alternatives to installing multiple visual studio versions for c++ toolsets?
I am developing a plugin for a program that has multiple version each compiled in c++ 2010 and c++ 2012 so I need those version of c++ toolset. For daily use I need visual studio 2013.
In the end I installed the express editions that use around 800mb each and do not add so much clutter.
MSDN's website says that if you want the C++ 2010 and C++ 2012 toolsets with VS2013, you'll need to install those VS versions on that particular machine. Link here
I don't think there are other alternatives to that.

Visual Studio 2013 can't located header files when using the VS 2010 platform toolset

Yesterday I had to reinstall Visual Studio 2010 on a computer with both VS 2012 and VS 2013, because I needed to compile older code. The Visual Studio 2010 installation caused header file issues, as described here . I followed the details provided in the answers, and got VS 2010 to install properly.
Now, when I run the VS 2010 version of msbuild, it compiles C++ code flawlessly. All the header files are properly installed in c:\program files (x86)\Microsoft Visual Studio 10.0\VC\include .
However, when I open a project in Visual Studio 2013, and set the Platform Toolset to v100 (which is VS 2010), it can't find the header files! Although they are right there!
This was originally a VS 2013 project, and I changed the platform toolset to VS 2010. This did not change the Include Directories property of the project, which was $(VC_IncludePath).
This macro is not defined by VS 2010, so the compiler can't find the include files.