SFML community forums

Help => General => Topic started by: thatoneguy on December 10, 2014, 08:48:03 am

Title: Transitioning from VS 2012 to VS Community 2013
Post by: thatoneguy on December 10, 2014, 08:48:03 am
So I'm switching over to Visual Studio Community 2013, and I'm having some trouble setting it up. I downloaded the SFML 2.1 Binaries for VS 2013 from here (http://en.sfml-dev.org/forums/index.php?topic=13010.0). I got the template to work, but I'd like to know how to set it up myself as well. I'm following from what I usually do in VS 2012, but that doesn't seem to work. I'm comparing it to the template project settings, but I can't seem to find the issue. I'm getting the following error:

(click to show/hide)
Title: AW: Transitioning from VS 2012 to VS Community 2013
Post by: eXpl0it3r on December 10, 2014, 09:01:02 am
You use a different runtime lib version than these SFML binaries were compiled with.
Title: Re: Transitioning from VS 2012 to VS Community 2013
Post by: Gambit on December 10, 2014, 09:07:01 am
Visual Studio 2013 (Including express, professional and community) use msvcr120.dll (Microsoft Visual C Redicstributable version 120), where as VS12 uses msvcr110.dll. You will either need to compile from source yourself (Best option in my opinion), or use a nightly build which can be found in eXpl0it3rs signature.
Title: Re: Transitioning from VS 2012 to VS Community 2013
Post by: thatoneguy on December 10, 2014, 09:16:05 am
You use a different runtime lib version than these SFML binaries were compiled with.

I should mention I'm not using a project file from VS 2012. The above error was with a new empty project. I used the same SFML binaries for both the template which passed the green cricle test and my own project which failed with the above error.

Visual Studio 2013 (Including express, professional and community) use msvcr120.dll (Microsoft Visual C Redicstributable version 120), where as VS12 uses msvcr110.dll. You will either need to compile from source yourself (Best option in my opinion), or use a nightly build which can be found in eXpl0it3rs signature.

I plan to, but I'm curious why my test settings aren't working.
Title: Re: Transitioning from VS 2012 to VS Community 2013
Post by: eXpl0it3r on December 10, 2014, 09:33:25 am
The error essentially says everything and if you don't understand it, Microsoft's documentation writes the errors out in a bit better English, just search for it.

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

The SFML libraries you are trying to link are built with the static release version of the runtime lib, while you try to link the dynamic debug libs. Thus they are incompatible, thus they don't link.

Build from source and follow the tutorial. Don't mix static and dynamic libs and don't mix debug and release modes.
Title: Re: Transitioning from VS 2012 to VS Community 2013
Post by: thatoneguy on December 10, 2014, 10:37:03 am
The error essentially says everything and if you don't understand it, Microsoft's documentation writes the errors out in a bit better English, just search for it.

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

The SFML libraries you are trying to link are built with the static release version of the runtime lib, while you try to link the dynamic debug libs. Thus they are incompatible, thus they don't link.

Build from source and follow the tutorial. Don't mix static and dynamic libs and don't mix debug and release modes.

Ah okay. Made a slight change to properties for static:
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
 

All is good now.