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

Author Topic: Any idea on why I can't use /MT?  (Read 2317 times)

0 Members and 1 Guest are viewing this topic.

sknnywhiteman

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Any idea on why I can't use /MT?
« on: February 08, 2013, 04:19:41 am »
I built SFML 2.0 RC with CMake with a tutorial I found online, and I know it works, because I've used it before (with /MD setting), and it worked fine. I want to use the /MT flag with SFML, and I found out through the forums I need to rebuild it, so I installed CMake and did everything I had to with VS2012 command prompt, and it built fine. I made sure I used the "SFML_USE_STATIC_STD_LIBS=TRUE", but it still gives me the errors in studio when I try to compile it with link errors like
 
Quote
sfml-window-s.lib(Window.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in Source.obj
I'm so frustrated, because I've spent hours trying to fix this, and I have gotten no progress at all. Can you tell me what I need to fix to get this to work?
I'm using the settings -G "NMake Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=FALSE -D SFML_USE_STATIC_STD_LIBS=TRUE
Would someone by any chance already have pre-built sfml 2.0 RC with these specs? :D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Any idea on why I can't use /MT?
« Reply #1 on: February 08, 2013, 04:47:13 am »
Have you also switched your project to link the runtime libs with /MT?

I built SFML 2.0 RC with CMake with a tutorial I found online, and I know it works, because I've used it before (with /MD setting), and it worked fine.
Why don't you just follow the official tutorials? If you don't understand them well enough, could you elaborate on what the problem is, so Laurent might make things a bit more clearer.

I'm using the settings -G "NMake Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=FALSE -D SFML_USE_STATIC_STD_LIBS=TRUE
There shouldn't be any spaces between -D and the option name, but maybe CMake accepts it anyways.

Would someone by any chance already have pre-built sfml 2.0 RC with these specs? :D
Not for the RC code base, since that's already quite outdated, but I maintain Unofficial Nightly Builds.
Note: If you talk about SFML 2 RC you're referring to the code base at the time the release candidate got published. What you want to talk about though is the build from source.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

sknnywhiteman

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: Any idea on why I can't use /MT?
« Reply #2 on: February 08, 2013, 04:21:14 pm »

Not for the RC code base, since that's already quite outdated, but I maintain Unofficial Nightly Builds.
Note: If you talk about SFML 2 RC you're referring to the code base at the time the release candidate got published.

I downloaded it and tried using the STATIC_STD libs you built, and the errors with the Runtime went away. I don't quite know why mine weren't building. But, thanks for the builds!