Accommodate VS2013 project to VS2015 - c++

So I've recently upgraded VS2013 to VS2015 and I'm still struggling accommodating the code & project's definitions to make it work.
I have dozens of projects in my solution. I also use jsoncpp as an additional lib.
When compiling a single project, I get this error:
3>LINK : fatal error C1047: The object or library file '..\Libs\json_cpp\build\vs71\release\lib_json\json_vc71_libmt.lib' was created with an older compiler than other objects; rebuild old objects and libraries
So I've open the Libs\json_cpp\makefiles\vs71\jsoncpp.sln with VS2015 and rebuild the solution.
that didn't help.
Possible Reason
My projects are all using Platform Toolset Visual Studio 2015 - Windows XP (v140_xp)
while the jsoncpp Platform Toolset is Visual Studio 2013 - Windows XP (v120_xp)
If this is indeed the issue so the obvious solution is to have both solutions compile in the same Platform Toolset Visual Studio 2015 - Windows XP (v140_xp).
Possible Solution
So, I've tried that. and got countless of these warnings:
json_value.obj : warning LNK4006: "public: static int const std::numeric_limits<unsigned short>::digits10" (?digits10#?$numeric_limits#G#std##2HB) already defined in json_writer.obj; second definition ignored
Anybody else suffered from this agonizing process of VS upgrade and can share some insights?

Related

lib built in vs c++ 2005 How to use them in vs 2017?

I have the following problem: I have a library, let's call it library.lib that is written in VS C++ 2005. In VS 2017 I've got the following error when compiling:
LINK : fatal error C1047: The object or library file 'library.lib' was created with an older compiler than other objects; rebuild old objects and libraries
Could you help me to solve it? Possibly I have to run VS 2005. However, I cannot install it. I have Windows 10 and the installer does not work.
Pol
is there anybody here, who might help, the project cannot wait?

link MinGW gcc c++ application against mvsc c++ .lib

I need to integrate the Intel RealSense C++ library (legacy 2016 R3 not the current 2.0 SDK) to an already existing application built with Qt MinGW g++ 32-bit (installed by Qt5.11 offline installer)
basically, they provide the headers and some .lib files to compile and link applications
when I try to compile the Segmentation example in Visual Studio, they work, (they provide a .props file that I can add to the Visual Studio Solution's Project's Property Manager, btw, I am using Visual Studio Community 2017 on Windows 10 Home 64-bit), but, the application I am developing was made using QtCreator so I need to be able to compile with QtCreator, and migrating the build to Visual Studio might not be a viable solution
if I try to compile the Segmentation example with MinGW (32-bit) in QtCreator (installed by Qt5.11 offline installer) I get error messages like this one
C:\src\Debug\app\main.cpp:34: error: undefined reference to `UtilCmdLine::UtilCmdLine(Intel::RealSense::Session*, int)'
and even if I try to use MSVC (64-bit) in QtCreator (installed by Qt5.11 offline installer) (which is not really a great option)
I get error messages like this one
C:\src\Debug\app\main.cpp.obj:-1: error: LNK2019: unresolved external symbol PXCSession_CreateFromPath referenced in function "public: static class Intel::RealSense::SenseManager * __cdecl Intel::RealSense::SenseManager::CreateInstance(wchar_t const *)" (?CreateInstance#SenseManager#RealSense#Intel##SAPEAV123#PEB_W#Z)
for several symbols
has anyone solved a similar problem?
MinGW I think I understand not working, because of MSVC symbol mangling and a general different ABI, and because the tools to work with .lib files in MinGW are no longer being available (at least not in the official website), but why is MSVC not working? am I missing something that Visual Studio has that QtCreator does not?
would there be a way to make something like a wrapper library in visual studio so that I can use in MinGW? I saw some people who had similar problems with .lib files being told to use a COM style interface if they could
I saw that being the
just to clarify, I'm not sure if it's a problem introduced by the Qt libraries but there is some of the application's code just doesn't compile correctly with MSVC, so for now, I'd prefer a way to compile with MinGW in QtCreator, though we might eventually get it to work with both compilers (or at least try to)

visual studio 2012 mingw and format error

I'm taking a c++ class and the instructor has stated that we can use any IDE that we like however, he will be compiling our .cpp and .h files using mingw. I'm using Visual Studio 2012. How should be creating projects using VS2012 to ensure that they will compile with mingw? Can I start the project as win32 or should I use a general empty project? Compilers and dll's are an enigma to me.
I also have code::blocks installed from a previous class and then just to really screw up my default settings and directories I downloaded and installed Visual Studio 2015 in an attempt to upgrade. I have since uninstalled VS2015 and all of the other software that installed at the same time. Now, anytime I start a new project in VS2012 I get the error:
An attempt was made to load a program with an incorrect format
(Exception from HRESULT 0X8007000B)
I suspect that when I installed VS2015 something changed where my x86 VS2012 is looking trying to use x64 or something other than Visual Studio 11.
I'd love to fix that glitch if you can help.
Thanks

Is it possible to have VS2010 and VS2012 projects concurrently on the same source code

I have a VS2010 library project that I would like to use in a new app in VS2012. Of course when I open VS2012 it wants to update the library project. Is there any way of having two projects - one for VS2010 and one for VS2012?
We have a large product portfolio and not all apps will move to VS2012 at the same time.
Generally, as long as you're running VS2010 SP1, everything will work appropriately opening the project with both versions of VS.
For C++ compatibility specifically:
You can use Visual Studio 2012 to open a C++ project that was created in Visual Studio 2010 SP1. If you want to use the Visual Studio 2012 build environment to build a project that was created in Visual Studio 2010 SP1, you must have both versions of Visual Studio installed on the same computer.
The full list of compatibility information can be found on msdn

Installing Visual Studio 2010 AFTER Visual Studio 2012

I had Visual Studio 2012 installed on my new development computer and it worked fine. Without thinking I then installed VS2010 onto the computer which already had the 2012 install. 2012 continues to work correctly but 2010 cannot compile any of my previous working source code and it seems unable to locate any of the correct libraries.
For instance in a simple C++ hello world program I get the following error
fatal error C1083: Cannot open include file: 'iostream': No such file or directory
I have tried un-installing both, installing 2010 first then 2012 but the same problems still occur. I have also made sure it is using platform toolkit v100 but it seems to make no difference.
I have also tried repairing VS2010 to no avail.
Has anyone else experienced the same issues and if so how did they manage to fix it?
I'd guess it has something to do with VS2012's new v110_xp platform toolset which uses an SDK similar to 7.1. For my older projects that need 2003 Server and XP support I use that toolset now with VS2012 instead of the default toolset with VS2008 or VS2010 so I no longer need the older Visual Studios. It might solve your problem as well.