Hello,
I installed SFML to Visual Studio 2010 following the instructions here:
http://www.sfml-dev.org/tutorials/1.6/start-vc.phpI am using static linking, so I included sfml-system-s.lib in the Release configuration and sfml-system-s-d.lib in the Debug configuration. I have also defined SFML_STATIC in the preprocessor definitions for both configurations. (Not too entirely sure if this step is necessary or not)
I am pretty sure I have followed the instructions precisely and correctly, as when I copy that example program into VS2010 in the Release configuration, compile it, and run the .exe, it works fine with problems.
However, when I try the same with the Debug configuration, with everything the same except I include sfml-system-s-d.lib rather than sfml-system-s.lib, the program compiles, but the program does not run.
When clicking the
little green Start Debugging button, I get this error:
http://i.imgur.com/fh16m.pngWhen I go to the Project location and try running the .exe from there, I get this error:
http://i.imgur.com/CwEUN.pngI solved the problem by including sfml-system-s.lib rather than sfml-system-s-d.lib for the
Debug configuration as well. Then the program and .exe runs fine.
However the Getting Started - SFML and Visual Studio tutorial that I linked above states that:
Important: for the Debug configuration, you have to link with the debug versions of the libraries, which have the "-d" suffix (sfml-system-d.lib in this case). If you don't, you may get undefined behaviours and crashes.
I've only fiddled around with the debugger after including sfml-system-s.lib and seems to be working OK, but is there some other thing that I should do?
Edit: I tried using dynamic linking this time. Similar issues. I get the same error message whether running the program through VS2010's debugger, or through the .exe directly:
http://i.imgur.com/0FFVj.pngEdit 2: I am using Windows 7 Ultimate if that makes any difference. If I'm missing any other information, I will be glad to give it.