Compilation of the MFC application from Visual Studio 2010 to 2012. RC results in LNK2038

My project compiles and runs OK in debug and release modes in VS 2010. Today I tried to compile it with VS 2012, and I got this error:

1>  Generating Code...
1>pcrecppd.lib(pcrecpp.obj) : error LNK2038: mismatch detected for '_MSC_VER': 
value '1600' doesn't match value '1700' in NamesEditorDlg.obj

I searched for "_MSC_VER" in the code, but could not find a match. I also could not find "1600" or "1700".

So, I am wondering how I can solve this problem.

+5
source share
4 answers

It looks like you are using .lib from vc2010 to vc2012 (assuming it looks like a PCRE library). You will need to recompile all your .libs or run-time links with a DLL (e.g. LoadLibrary, GetProcAddress, etc.).

+5
source

"", " " "Visual Studio 2010 (v100)". .

+3

Take a look at http://msdn.microsoft.com/en-us/library/b0084kay.aspx It seems that the variable contains the version number of the compiler. I would think that the best way to fix this is to create a new project in 2012 and add the source files to the new project.

+1
source

NO, all you need to do is check the project properties. There is a link to old project files. You need to open the project properties on the ".NET Framework and Links" page so that all links add new ones for the new 2012 project files.

0
source

All Articles