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

Author Topic: Run-Time Check Failure #2 - Stack around the variable 'App'  (Read 3348 times)

0 Members and 1 Guest are viewing this topic.

Fuv

  • Newbie
  • *
  • Posts: 35
    • View Profile
Now I started making Window. I added necessary libs to linker output: sfml-window.lib and it compiles and links good, but after running I got msg:
Code: [Select]
Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted.

I dont know what is going on. I read that its my code fault, but I copied it from tutorial:
Code: [Select]
#include <SFML/Window.hpp>

int main()
{
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

}


And error is becouse of the line in main(), becouse if i put it into comment program works good(doing nothing but works)

Kind Regards
Fuv

Mindiell

  • Hero Member
  • *****
  • Posts: 1261
    • ICQ Messenger - 41484135
    • View Profile
Run-Time Check Failure #2 - Stack around the variable 'App'
« Reply #1 on: May 28, 2010, 10:21:59 pm »
maybe an App.Close() can be a good idea, no ?
Is this really your main ? it's a bit empty
Mindiell
----

Fuv

  • Newbie
  • *
  • Posts: 35
    • View Profile
Run-Time Check Failure #2 - Stack around the variable 'App'
« Reply #2 on: May 28, 2010, 10:25:58 pm »
Quote from: "Mindiell"
maybe an App.Close() can be a good idea, no ?


no, the problem still shows.

Quote
Is this really your main ? it's a bit empty



Yes. its all I have. Yesterday I started using SFML and I m using this tutorial:
http://www.sfml-dev.org/tutorials/1.6/window-window.php

Kind Regards
Fuv

Fuv

  • Newbie
  • *
  • Posts: 35
    • View Profile
Run-Time Check Failure #2 - Stack around the variable 'App'
« Reply #3 on: May 28, 2010, 10:35:29 pm »
Even if I wrote in code(only it it main!):
Code: [Select]
sf::Window w;

i got the message box with error.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Run-Time Check Failure #2 - Stack around the variable 'App'
« Reply #4 on: May 28, 2010, 11:29:47 pm »
Use debug libraries (with -d suffix) in debug mode. It's written in the tutorial.
Laurent Gomila - SFML developer

Fuv

  • Newbie
  • *
  • Posts: 35
    • View Profile
Run-Time Check Failure #2 - Stack around the variable 'App'
« Reply #5 on: May 30, 2010, 11:46:33 am »
Yeah, its workin'. I should have read that tutorial more carefully. Thanks.

Kind Regards
Fuv