Linker error LNK2038: mismatch detected in Release mode

前端 未结 4 766
生来不讨喜
生来不讨喜 2021-02-02 07:11

I am trying to port a small app of mine from Win XP and VS 2005 to Win 7 and VS 2010.

The app compiles and runs smoothly in Debug mode, however in Release mode I get the

4条回答
  •  天命终不由人
    2021-02-02 07:43

    I had the same error. In my case the solution is easy: I had one project A depending on another project B. B had a preprocessor definition _DEBUG in debug mode and A didn't.

    Just add _DEBUG to project A(project->properties->c++->preprocessor->preprocessor definitions) and you're done.

提交回复
热议问题