0

I have a project which was written by somebody else. It is based on QT.

I downloaded QT and compiled it with VS 2012.

Now I am compiling my application with VS2012 and getting this linker error:

Error   215 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in aboutdialog.obj ProjectPath\qtmaind.lib

What is the problem and how can I fix it?

mans
  • 17,104
  • 45
  • 172
  • 321

1 Answers1

1

The linker complains that the version of the Microsoft compiler used to compile one compilation unit (aboutdialog.obj) is different from that of your library (ProjectPath\qtmaind.lib).

MSVC 1600 is included in Visual Studio 2010, while MSVC 1700 is included in Visual Studio 2012.

It seems that your attempt to compile everything with VS2012 was not quite exhaustive.

danielschemmel
  • 10,885
  • 1
  • 36
  • 58
  • Thanks. How can I find which file/library is not in correct version? – mans May 15 '13 at 09:40
  • You could add that compiling it with the VS Command prompt makes this problem avoidable. When running the `configure` script, you should add the option `-platform win32-msvc2012` – JBL May 15 '13 at 09:40
  • That actually depends on the QT version the OP is trying to build, which I cannot deduce from his question. (Check http://stackoverflow.com/questions/12113400/compiling-qt-4-8-x-for-visual-studio-2012 for a related discussion with QT 4.8.x) – danielschemmel May 15 '13 at 09:46
  • Oh, yes, it's meant for QT 5.x.x actually. – JBL May 15 '13 at 10:08
  • I am using QT 4.8.x, can I use QT 5? Are they compatible? – mans May 15 '13 at 11:39
  • If you are using QT 4.8.x, the related question in my above comment should help. QT 5 is obviously slightly different form QT 4.8.x, check http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5 for hints. – danielschemmel May 15 '13 at 12:53