SFML community forums
Help => General => Topic started by: inlinevoid on April 17, 2010, 05:35:19 am
-
Alright so I just upgraded to 1.6 and I can't get even a simple program running correctly. Maybe I'm getting a little rusty seeing as how I wrote an SFML engine for all of my games and never actually had to write any SFML code in the past month.
Let me list how I have everything set up and tell me if I'm missing something.
Preprocessor
Linker dependencies
sfml-graphics-d.lib
sfml-system-d.lib
sfml-audio-d.lib
sfml-window-d.lib
Source
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
sf::Event Event;
while (App.IsOpened())
{
App.GetEvent(Event);
if(Event.Type == sf::Event::Closed)App.Close();
App.Clear();
App.Display();
}
return EXIT_SUCCESS;
}
All of the headers, libs, DLL's are in the right place and I'm using MSVC08. Not sure what the problem is here but I'm getting a runtime error at App.Clear();
I've tried creating a couple different projects to see if I'm messing anything up by accident but they all have the same results.
-
Are you sure you set them properly and the folders are correct?
You could try setting your link order to
sfml-audio.dll
sfml-graphics.dll
sfml-window.dll
sfml-system.dll
-
Are you sure you set them properly and the folders are correct?
You could try setting your link order to
sfml-audio.dll
sfml-graphics.dll
sfml-window.dll
sfml-system.dll
Nope, doesn't work. I'm positive I have everything in the right folders, too.
-
Hey I got exactly the same problem as you. I'm geting runtime error at App.Clear(); aswell.
Im running windows vista ultimate 64 bit.
I have downloaded a fresh copy of SFML 1.6 and linked it in vs2008 but the problem is still there.
So if anyone have any ideas please tell :wink:
Thanks
Qolz
-
What if you recompile everything for 64 bits architecture? The SFML binaries are compiled for 32 bits.
-
Thx for posting Laurent ( no it didn't work ... read below :) )
I found out what the problem was... it was pretty silly.
I used to have version 1.5 of sfml. Then when i upgraded to 1.6 i forgot one thing. The dlls! I used the version 1.5 dlls with version 1.6. :roll: :oops:
Well anyways it's fixed now, so now i can start learning :wink: