SFML community forums
Help => Window => Topic started by: zoloproject on October 18, 2008, 11:40:08 pm
-
THis is under VS2008 and windows xP
heres the simple code I'm using
#include <SFML/Window.hpp>
int main()
{
sf::Window Window(sf::VideoMode(800, 600, 32), "Simple Window.");
bool running = true;
while (running)
{
sf::Event Event;
while (Window.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
running = false;
}
Window.Display();
}
Window.Close();
return (0);
}
The console comes up and then I get an error message saying an unexpected error has occured.
-
Are you linking the correct librarties? (debug / release?)
-
I'm linking these lib's
sfml-system-s.lib
sfml-window-s.lib
sfml-main.lib
I tried with and without main.loib being there and I should note if its not obvious that this is a console app not a win32 project.
-
I tried with the debug libs and the window poped up like it should've, Guess I've never used libs/dlls other than the DirectX SDK and its not picky about debug versus retail when compiling with debug runtimes.
-
You're right, C DLLs are in general mush less picky. But with SFML C++ libraries you have to take care of not mixing debug and release configurations.