I get a strange linker error when trying to compile using VS2005 CRT using the Visual Studio 2015 toolkit.
The same code compiles fine in any other version of the toolbox (2005,2010,2012,2013).
The code must be compiled under VS2005 CRT for proper communication with other projects.
How to reproduce: Create a new empty Dynamic Library (dll) project (in VS2015, toolset v140) add a source file (.cpp):
//1.cpp
Change the VC ++ inclusion directories and library directories to:
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include C:\Program Files (x86)\Microsoft Visual Studio 8\VC\atlmfc\include C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include C:\Program Files (x86)\Microsoft Visual Studio 8\VC\lib C:\Program Files (x86)\Microsoft Visual Studio 8\VC\atlmfc\lib C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Lib
Then just compile, you will get this error:
1>StdAfx.obj : error LNK2019: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,unsigned int,void (__thiscall*)(void *))" ( ??_M@YGXPAXIIP6EX0 @ Z@Z ) referenced in function "void __cdecl `dynamic atexit destructor for 'fasdfp''(void)" ( ??__Ffasdfp@ @YAXXZ)
The same thing happens if you install the library and include the paths to VS2010 CRT and the Windows SDK.
So why is VS2015 generating this extra feature? And most importantly, how can I get around this?
The same linker error appears on every static member that I have, and similar for several classes.
source share