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

Author Topic: Visual Studio Buffer Overrun  (Read 3910 times)

0 Members and 1 Guest are viewing this topic.

Dekuzora

  • Newbie
  • *
  • Posts: 3
    • View Profile
Visual Studio Buffer Overrun
« on: January 02, 2012, 12:07:25 am »
I have been reading through the tutorials to learn SFML, since I am still a beginner. Recently, whenever I have tried to create a window, I get an error message of


 
Quote
    "A buffer overrun has occurred in SFML test.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.

For more details please see Help topic 'How to debug Buffer Overrun Issues'."


I have checked the tutorials and various other topics in which people have had this same problem. None of them have been of any help. I am running Visual Studio 2010 Express and SFML 1.6 on a Windows 7 64-bit.

Here is the code I am using that does this:
Code: [Select]

#include <SFML/System.hpp>
#include <iostream>
#include <SFML/Window.hpp>

int main(int argc, char** argv)
{
sf::Window App(sf::VideoMode::GetMode(0), "SFML Window", sf::Style::Close);
sf::Event Event;
while (App.IsOpened())
{
if (App.GetEvent(Event))
{
if (Event.Type==Event.Closed)
App.Close();
}
}
return EXIT_SUCCESS;
}



I am fairly certain there is probably a ridiculously obvious solution staring me right in the face, but I am simply not experienced enough to see it. If anyone knows or has an idea of how to fix this, I would appreciate your help.[/code]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Visual Studio Buffer Overrun
« Reply #1 on: January 02, 2012, 08:03:44 am »
You must recompile SFML with VC++ 2010.
Laurent Gomila - SFML developer

Dekuzora

  • Newbie
  • *
  • Posts: 3
    • View Profile
Visual Studio Buffer Overrun
« Reply #2 on: January 02, 2012, 05:55:15 pm »
Thank you! But there's still one other problem. As I said before, I am very inexperienced, and I have tried to recompile, but I don't understand how. I don't understand the tutorials about how to do it, and I'm not even sure which file I'm supposed to download to compile in the first place. Anyone who knows how to recompile very well could you please explain the process in a simpler way?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Visual Studio Buffer Overrun
« Reply #3 on: January 02, 2012, 07:00:40 pm »
There are video tutorials on this forum if you can find them.
Laurent Gomila - SFML developer

Serapth

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Visual Studio Buffer Overrun
« Reply #4 on: January 02, 2012, 07:39:25 pm »
You can download them pre-compiled here if you want.  Link at pages bottom, but being new the page and the one after it might be handy to you any ways.

Compiling them yourself isn't really a big task, but there are some gotchas you will run into.

Dekuzora

  • Newbie
  • *
  • Posts: 3
    • View Profile
Visual Studio Buffer Overrun
« Reply #5 on: January 02, 2012, 08:59:13 pm »
Thank you so much! It works now perfectly. I am glad that there are some people who know what they're doing when it comes to this, because I certainly don't.

Serapth

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Visual Studio Buffer Overrun
« Reply #6 on: January 02, 2012, 09:06:19 pm »
Quote from: "Dekuzora"
Thank you so much! It works now perfectly. I am glad that there are some people who know what they're doing when it comes to this, because I certainly don't.



Dont worry, knowledge comes from slamming your head off your desk over and over, so consider those bumps and bruises a good thing. :)

 

anything