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

Author Topic: SMFL-2.0 won't statically link with Visual Studio 2012. Dynamic works fine.  (Read 1226 times)

0 Members and 1 Guest are viewing this topic.

lightfire

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • http://facebook.com/sbarna
Works fine with dynamic modules, but when I ported over the static settings from VS 2010 it got the following errors repeatedly: http://stackoverflow.com/questions/12989088/odd-linker-errors-introduced-when-upgrading-to-vs-2012.

And Yes, I made sure /MT and /MTd was used in compilation with both the .lib and projects.

Anyway just a heads up. Its appears to be a problem with the Graphics package. This is with the latest snapshot from Oct. 6th or so.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
I changed the description of the "General Discussion" forum to something more obvious:
Quote
For everything that is not a help request
... but apparently it's still not enough :P

Did you recompile SFML? If so, with which CMake options? And what options did you change in your own project?
Laurent Gomila - SFML developer

lightfire

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • http://facebook.com/sbarna
Oh crap this isnt the help forum! Feel free to move this then.

Anyway, Yes i played around with what I believe to be every possible combination of cMake and VS12 settings.

For cMake, i tried both NMake and VS12 project files with SFML_USE_STATIC_LIBS checked (and BUILD_SHARED_LIBS unchecked).

With my Project, I had SFML_STATIC defined, linked to the proper static SFML libs, had /MT for the runtime library when compiling both SFML and my project. The interesting thing was in VS2010 I was compiling with runtime DLLs (/MD) and using a static SFML build and everything worked. I suspect the C++11 specs no longer allow that.

Anyway, since the dynamic DLLs work this isn't urgent, just confusing. I can post the command lines I you would like.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Quote
With my Project, I had SFML_STATIC defined, linked to the proper static SFML libs, had /MT for the runtime library when compiling both SFML and my project
I have no idea why it doesn't work, from what you say everything looks ok.

Quote
The interesting thing was in VS2010 I was compiling with runtime DLLs (/MD) and using a static SFML build and everything worked.
What else works in VS2010? What else doesn't work in VS2012? Well, can you summarize what works and what doesn't, with both compilers? :P

Quote
I suspect the C++11 specs no longer allow that.
I don't think that the C++ standard bothers with this kind of configuration stuff ;)
Laurent Gomila - SFML developer

 

anything