MSVC 2015 using 2013 Platform Toolset - c++

I have a copy of Microsoft Visual 2015 on a Windows 32 bit Computer. I would like to compile C++ code with a 2013 build set. I have researched this issue, and I am unfortunately very stuck and looking for guidance.
As you can see in my configurations (below), I have options of platform toolset for 2010 and 2008 in addition to the 2015 versions. I have downloaded Visual Studio 2013. Alas, the option does not appear to be added to the toolset choices!
My ultimate problem I am trying to solve is an error I get when I build code. Specifically:
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol
_WinMain#16 TestProject C:\Users\userProf\Desktop\workspace\TestProject\TestProject\MSVCRTD.lib(exe_winmain.obj)
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol
__imp__vsnprintf_s TestProject C:\Users\uperProf \Desktop\workspace\TestProject\TestProject\MSVCRTD.lib(vsnprintf_s.obj)
System Specs:
Some research:
https://social.msdn.microsoft.com/Forums/en-US/2f2bb34b-f8f2-4316-80e5-fd2b0d237e17/visual-studio-2013-v110-platform-toolset?forum=visualstudiogeneral
TFS Build 2013 - using Visual Studio 2015
Thanks in advance.

The "ultimate" problem seems fairly trivial. You've got a MSVC library in your project directory! That's bound to give version issues. Just remove it; MSVC finds its own libraries in its own install directory.

Related

VS 2017 Community gets linker errors but Professional doesn't

We're facing a strange issue and I've run out of troubleshooting ideas. The issue is that on some machines, which are running Visual Studio 2017 Community, we get reports that our project (which is CMake based) gets linker errors like this:
17>------ Build started: Project: ndt, Configuration: RelWithDebInfo x64 ------
17> Creating Library E:/NDT_3_0/19_Sept18/qualnet/RelWithDebInfo/exata_so.lib and object E:/NDT_3_0/19_Sept18/qualnet/RelWithDebInfo/exata_so.exp
17>ndt-main-windows-x64-vc14.obj : error LNK2019: unresolved external symbol edKJPOs664VT referenced in function "void __cdecl CheckLibraryLicenses(struct NodeInput*,...)
17>ndt-main-windows-x64-vc14.obj : error LNK2019: unresolved external symbol zzPIPSGJWa referenced in function main
...
17>E:\NDT_3_0\19_sep18\qualnet\bin\exata_so.exe : fatal error LNK1120: 17 unresolved externals
(Apologies if there are typos: for some reason they sent us a screenshot of the text instead of just a copy-and-paste of the text, so I'm transcribing. However, the parts I'm leaving out contain no mention of errors trying to open lmgr.lib which defines these symbols.)
The strange thing is, we can't reproduce these errors here when we do a fresh clone of the same Bitbucket repository they're using and follow the same build instructions. About the only difference I can tell is that our machines are running Visual Studio 2017 Professional. (Though I'm certainly not sure if this is actually the cause of the behavior differences.)
So far, what we've checked:
The library that contains the unresolved external symbols passes sha1sum checks so their Git client isn't corrupting the library binary file lmgr.lib - and same for the ndt-main-windows-x64-vc14.obj file.
The generated ndt.vcxproj project contains (the correct path to) lmgr.lib in the "Linker -> Input -> Additional Dependencies" property, as expected.
The lmgr.lib file does define the mentioned symbols (verified by Cygwin binutils nm).
On their machines, they get essentially the same linker errors whether using the Visual Studio 15 2017 Win64 generator and building from the IDE, or using the NMake Makefiles generator and building from a command prompt. Both configurations work fine on our machines.
I was wondering if somebody out there might have any ideas on why some machines might be failing to find the symbols in lmgr.lib whereas our machines have no problems completing the link stage.
(Possibly relevant: lmgr.lib contains the FlexNet Publisher licensing libraries where the symbols in both lmgr.lib and ndt-main-windows-x64-vc14.obj have been obfuscated by Flexera's lmstrip tool.)
It turned out that when we asked them to upgrade their Visual Studio 2017 Community installation to the latest service pack release, then after that the linker errors disappeared.

Not build after converting project into Visual Studio 2015 ?

We have an application which is run and build in visual studio 2010, after converting it into Visual Studio 2015 we are getting following error,
Error LNK2019 unresolved external symbol _memcmp referenced in function
I have looked at this link but did not understand properly
Its seems like something has changed in Visual Studio 2015 compiler and I am missing some settings to overcome this problem.
Could somebody please explain what has changed ?
we have used make file to build and generate file, to run successfully nmake command we need to link "vcruntime.lib" library file in Visual Studio 2015 and resolves the issue.
Thank you !!

Link error "already defined" after updating from Visual Studio 2010 to 2015

I have a c++ .dll project that was created in Visual Studio 2010 a few years ago. Its comprised of 4 .lib projects and 1 .dll project. Everything is statically linked so as to not require redistributables to be deployed on the host machine. Its been maintained over the years but we'd like to update all our compilers to Visual Studio 2015. Never as easy as it sounds.
I've opened the solution file in Visual Studio 2015 and it performed a quick conversion I suppose. However, when I build, I get these 2 errors.
LNK2005 ___report_gsfailure already defined in EasyHook32.lib(gs_report.obj) .....\LIBCMT.lib(gs_report.obj)
LNK1169 one or more multiply defined symbols found
So, I suppose my biggest question is, how can upgrading from VS2010 to VS2015 magically cause a link error all of a sudden? Also, how can I resolve this link issue?

Accommodate VS2013 project to VS2015

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?

Compiling FFTW 3.3.4 With Visual Studio 2013

Has anyone managed to compile the latest release of FFTW 3.3.4 using the Visual C++ compiler? I'm aware that the project maintainers offer pre-compiled dll's that were built with MinGW, but I'm looking to compile them myself.
So far, I've downloaded the source (of course), and I am trying to use one of the pre-made VS solutions that was reported to work for Visual Studio 2010 and FFTW 3.3, but when I'm building, I'm getting a few "unresolved external" errors like the following:
Error 1259 error LNK2019: unresolved external symbol _fftwf_mkprinter_str referenced in function _fftwf_export_wisdom_to_string C:\Users\bryan\Downloads\fftw-3.3.4\fftw-3.3.4\fftw-3.3-libs\libfftwf-3.3\export-wisdom-to-string.obj libfftwf-3.3
I know this is a bit of a stretch, but has anyone built FFTW 3.3.4 using Visual Studion 2013?
I have had the same problem.
Take a look on
http://wiki.panotools.org/Hugin_SDK_%28MSVC_2013%29
There is explained how you can build libfftw-3.3
In the same way you can build libfftwf-3.3
To build bench and benchf you have to remove '....\libbench2\aligned-main.c'
That is explained here (commentar 6)
Compiling FFTW source in Visual studio