Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Transitioning from VS 2012 to VS Community 2013  (Read 2553 times)

0 Members and 1 Guest are viewing this topic.

thatoneguy

  • Newbie
  • *
  • Posts: 25
    • View Profile
Transitioning from VS 2012 to VS Community 2013
« 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. 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)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: Transitioning from VS 2012 to VS Community 2013
« Reply #1 on: December 10, 2014, 09:01:02 am »
You use a different runtime lib version than these SFML binaries were compiled with.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Re: Transitioning from VS 2012 to VS Community 2013
« Reply #2 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.

thatoneguy

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Transitioning from VS 2012 to VS Community 2013
« Reply #3 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Transitioning from VS 2012 to VS Community 2013
« Reply #4 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

thatoneguy

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Transitioning from VS 2012 to VS Community 2013
« Reply #5 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.

 

anything