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

Author Topic: SFML static compiling for VS13  (Read 1620 times)

0 Members and 1 Guest are viewing this topic.

Mörkö

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
SFML static compiling for VS13
« on: June 23, 2014, 11:53:32 pm »
So I'm completely new to development in Windows, and aside from a new found gratitude to whoever invented package managers, I've run into some trouble trying to compile against the static libs.

Using Visual Studio Express 2013 and the `Visual C++ 11 (2012) - 32 bits` version of SFML.

I can compile it normally just fine, but when I add SFML_STATIC and change the linker options to sfml-xxx-s-d.lib then I get a bunch of these errors:

Quote
Error   1   error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in Source.obj

and
Quote
Error   29   error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z)

What am I doing wrong?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML static compiling for VS13
« Reply #1 on: June 24, 2014, 12:32:54 am »
Using Visual Studio Express 2013 and the `Visual C++ 11 (2012) - 32 bits` version of SFML.
They are not compatible.

The library must be compiled for the same compiler version as the project that uses it. Thus, recompile SFML or use nightly builds.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Mörkö

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: SFML static compiling for VS13
« Reply #2 on: June 24, 2014, 03:23:17 am »
Yep that fixed it, thanks!

I actually read the part in the tutorial where it said it would be incompatible, but then I tried to compile a small example, which happened to work so I thought maybe it's not a big deal and forgot about it until I made this thread.

::)