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

Author Topic: Opening a window - problem  (Read 3243 times)

0 Members and 1 Guest are viewing this topic.

raXor

  • Newbie
  • *
  • Posts: 7
    • View Profile
Opening a window - problem
« on: January 02, 2009, 07:00:00 pm »
Hi guys.
Today I want to start learn using the SFML. I've downloaded the libs, include files and so on.
Thereafter I linked all libs to a Project and want create my first Window with the SFML.
I written following code in my vs08:

Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>

//////////////////////////////////////////////////////
// Hauptprogramm start
//////////////////////////////////////////////////////

int main()
{
// Fenster erzeugen
sf::Window App(sf::VideoMode(800, 600, 32), "Title");

//////////////////////////////////////////////////

// In die Hauptschleife springen
for (int i = 0; i < 1000; i++)
{
App.Display();
}
// Hauptschleife Ende

//////////////////////////////////////////////////

// Programm Ende
return EXIT_SUCCESS;
}


No compile or linker errors. So the program started correctly. But at the End of the program I got an Error Message:

Quote

---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Error!

Program: ...entwicklung\Alle Projekte\SFML Übungen\Debug\SFML Übungen.exe
Module: ...entwicklung\Alle Projekte\SFML Übungen\Debug\SFML Übungen.exe
File:

Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted.

(Press Retry to debug the application)
---------------------------
Abort   Retry   Ignore  
---------------------------


Somethin is wrong with the variable "App" which create my Window. But I don't know what.

Except this problem I have a problem with my title. The running programm shows me the title as: ÌÌÌÌTitle
It would be nice if someone could help me.

PS: Sry for my spell or language mistakes. I'm a german guy ;)

Aval

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Opening a window - problem
« Reply #1 on: January 02, 2009, 07:16:44 pm »
Are you linking the debug libraries for debugging, and release for the release mode?

Like sfml-window-d.lib for debug, and sfml-window.lib for release.

raXor

  • Newbie
  • *
  • Posts: 7
    • View Profile
Opening a window - problem
« Reply #2 on: January 02, 2009, 07:30:57 pm »
Oh thanks, that was the problem :)

All works, without any problems.

 

anything