Updating VS6 C ++ to VS2013 gives LNK2038 MT_StaticRelease / MD_DynamicRelease errors

I was given a "vintage" project built using VS6 C ++ to try it out in VS2013 (no functional changes required, just build and run).

The last part I can’t work with is that the solution contains a MetaDASTest.exe file that uses MFC in the shared DLL, and the runtime uses a multithreaded DLL (/ MD).

MetaDASTest.exe is generated using MetaLibrary, which is a static library (.lib) that does not use MFC (using standard Windows libraries), and the runtime library is set to Multi-Threaded (/ MT).

The output generated when the MetaDASTest.exe project is created looks like this:

Searching ..\..\Deployment\Release\MetaLibrary.lib:
Found "public: __thiscall Unipower::MetaLibrary::CSchemaSingleton::~CSchemaSingleton(void)" (??1CSchemaSingleton@MetaLibrary@Unipower@@QAE@XZ)
Referenced in MetaDASTest.obj
Referenced in MetaDASTestDlg.obj
Loaded MetaLibrary.lib(SchemaSingleton.obj)
MetaLibrary.lib(SchemaSingleton.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in MetaDASTestDlg.obj

      

It all builds in VS6 unchanged ... why does the RuntimeLibrary have to match between the calling exe and the called lib in VS2013? I missed a project property setting that was not set correctly with the upgrade wizard?

+3


source to share





All Articles