4

I'm trying to compile the Hello World program from the Bullel Physics Wiki in Visual Studio 2012 Express.
I was able to generate and import the three library projects needed to run the example, but there seems to be a problem when linking them.
In the compile log there are 38 of these errors, repeated a lot of times for each of the libraries.

error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Main.obj

I can't understand what's wrong.

rrrrrrrrrrrrrrrr
  • 344
  • 5
  • 16

4 Answers4

3

I had this problem as well, its easy to fix once you realize it.

Make sure all your projects match the same Runtime Library per configuration.

More information: http://www.davidlenihan.com/2008/01/choosing_the_correct_cc_runtim.html

TIHan
  • 632
  • 4
  • 12
0

To add to TIHan's answer

One place worth looking is in your Linker->Input->Additional Dependencies section. I wound up noticing that I had a release build linked to my app, when the debug build should have been the one linked. As soon as I changed it, the error went away.

zeboidlund
  • 9,731
  • 31
  • 118
  • 180
0

Another thing to check is the project configuration window, the one where you select which configuration is actually used per-project for the solution's current configuration setting. For instance, I recently had a solution where the release configuration had one of the static library projects set to build the debug version which caused this error.

Eric Cosky
  • 554
  • 3
  • 11
0

You could also get this error if a dependent project (producing a .lib) is not included in the solution and therefore has not been built properly.