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

Author Topic: App keeps crashing before or while creating the window?  (Read 2426 times)

0 Members and 1 Guest are viewing this topic.

zoloproject

  • Newbie
  • *
  • Posts: 3
    • View Profile
App keeps crashing before or while creating the window?
« on: October 18, 2008, 11:40:08 pm »
THis is under VS2008 and windows xP

heres the simple code I'm using
Code: [Select]
#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.

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
App keeps crashing before or while creating the window?
« Reply #1 on: October 19, 2008, 02:30:19 am »
Are you linking the correct librarties?  (debug / release?)

zoloproject

  • Newbie
  • *
  • Posts: 3
    • View Profile
App keeps crashing before or while creating the window?
« Reply #2 on: October 19, 2008, 06:56:29 am »
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.

zoloproject

  • Newbie
  • *
  • Posts: 3
    • View Profile
App keeps crashing before or while creating the window?
« Reply #3 on: October 19, 2008, 07:00:50 am »
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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
App keeps crashing before or while creating the window?
« Reply #4 on: October 19, 2008, 09:09:59 am »
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.
Laurent Gomila - SFML developer