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

Author Topic: Compile for use of static Runtime Library  (Read 2490 times)

0 Members and 1 Guest are viewing this topic.

sharethis

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Compile for use of static Runtime Library
« on: February 25, 2013, 11:58:29 am »
I want to embed the runtime library "/MT" instead of "/MD" and therefore I have to build SFML 2.0 RC with the same option. With the graphical interface of CMake I changed all "/MD" options of the configuration to "/MT" and created the project files for Visual Studio 11. I did this once for debug and once for release and built these two projects using Visual Studio 11 once in debug mode and once in release mode.

Both the SFML libraries and my application using it compiled without errors. My question is just if the described procedure is correct. Do I need additional changes or is this the correct way to build SFML with embedded runtime library? I want to be sure to haven't misdo something about the SFML library built because I am haunting a bug in my application.

My system is Windows 8 64 and Visual Studio 11.
« Last Edit: February 25, 2013, 12:38:35 pm by sharethis »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Compile for use of static Runtime Library
« Reply #1 on: February 25, 2013, 12:04:30 pm »
Why didn't you enable SFML_USE_STATIC_STD_LIBS?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

sharethis

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Compile for use of static Runtime Library
« Reply #2 on: February 25, 2013, 12:27:11 pm »
Actually I did so. I want my application to include all dependencies statically. That includes the standard library you mentioned, the runtime library this quesion is about and other libraries as SFML itself, GLEW, ...

These is the CMake configuration I used to build the project files for the release libraries.

« Last Edit: February 25, 2013, 12:30:18 pm by sharethis »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Compile for use of static Runtime Library
« Reply #3 on: February 25, 2013, 12:53:20 pm »
Quote
That includes the standard library you mentioned, the runtime library this quesion is about
These are the same thing. In fact we should say "the runtime of the standard library" ;)
So you don't need to set the /MD flag yourself if you use this option.
Laurent Gomila - SFML developer

sharethis

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Compile for use of static Runtime Library
« Reply #4 on: February 25, 2013, 01:22:17 pm »
Could it lead into errors to do so anyway? Then I would rebuild the libraries again.