SFML community forums
Help => General => Topic started by: Treena on September 26, 2010, 03:11:00 am
-
I'm getting strange errors in Visual Studio 2010 when running the "Display a Sprite" tutorial. I'm able to run the "Using rendering windows" sample program, but the title of the window it produces isn't "SFML Graphics". It has some strange characters before SFML.
But when I try to run the "Display a Sprite" tutorial, the program starts beeping and then it stops responding. The console window also displays a lot of weird characters.
Since I can run the "Using rendering windows" sample program, I don't think this error has to do with installing SFML, but correct me if I'm wrong.
And the sprite I'm trying to load is a triangle I drew in paint and saved it as a .png.
Can anyone help me?
-
Have you linked the correct libraries?
sfml-module.lib in dynamic release mode
sfml-module-d.lib in dynamic debug mode
sfml-module-s.lib in static release mode
sfml-module-s-d.lib in static debug mode
...where module is the package (system, window, graphics...) you are using. In SFML 2, the libraries start with sfml2 instead of sfml.
-
Have you linked the correct libraries?
sfml-module.lib in dynamic release mode
sfml-module-d.lib in dynamic debug mode
sfml-module-s.lib in static release mode
sfml-module-s-d.lib in static debug mode
...where module is the package (system, window, graphics...) you are using. In SFML 2, the libraries start with sfml2 instead of sfml.
Thanks for the reply!
How would I know if I'm in dynamic release mode, dynamic debug mode, static release mode or static debug mode?
Um I've linked sfml-graphics.lib in my projects properties -> config properties -> Linker -> Input -> Additional Dependencies
Also, I'm using SFML 1.6. Would you recommend using SFML 2.0?
-
In the toolbar of VS2010 there's combo box where you can switch between Debug and Release. In the top left of the properties windows you can select if you want to set the properties for Debug or Release (or All configurations).
I suggest that you add all SFML libraries to your projects. Then you don't have to risk missing one.
-
Thanks to you guys, I found that I was in debug mode, so in the project properties, I linked sfml-graphics-d.lib instead of sfml-graphics.lib, and it worked!!! :D