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

Author Topic: SFML Debug/Release with VC+ 2010 errors  (Read 3819 times)

0 Members and 1 Guest are viewing this topic.

Dark Byte

  • Newbie
  • *
  • Posts: 30
    • View Profile
SFML Debug/Release with VC+ 2010 errors
« on: September 27, 2010, 12:43:10 am »
I am using VC++ 2010 on Win7 64-bit and SFML 1.6

When I use debug mode with the proper libraries (-d suffix) it always crashes and gives me this error:
"The application was unable to start correctly (0xc0150002). Click OK to close the application."
It will not run with the debug libraries.

But when I use the non-debug libraries it runs, but when it closes it gives this error:
"Run-Time Check Failure #2 - Stack around the variable 'App' was corrupted."

In Release mode it is even worse it gives this 20 times
"A buffer overrun has occurred in 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'."

Here is the source:
Code: [Select]

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

#pragma comment(lib, "sfml-system.lib")
#pragma comment(lib, "sfml-window.lib")

int main()
{
sf::Clock Clock;
sf::Window App(sf::VideoMode(800,600,32), "test");
while ( Clock.GetElapsedTime() < 10.0001f )
{
std::cout<<Clock.GetElapsedTime()<<"\n";
App.Display();
}
return 0;
}

PeterWelzien

  • Newbie
  • *
  • Posts: 38
    • View Profile
SFML Debug/Release with VC+ 2010 errors
« Reply #1 on: September 27, 2010, 07:51:14 pm »
Have you compiled the libraries yourself? The libraries that are provided with SFML 1.6 are for MSVS2008 only, they don't work with 2010.
/Peter Welzien

Dark Byte

  • Newbie
  • *
  • Posts: 30
    • View Profile
SFML Debug/Release with VC+ 2010 errors
« Reply #2 on: September 28, 2010, 03:31:28 am »
Oh no I have not. Also will it work with the express editions of MSVC? And how could I compile it myself?

PeterWelzien

  • Newbie
  • *
  • Posts: 38
    • View Profile
SFML Debug/Release with VC+ 2010 errors
« Reply #3 on: September 28, 2010, 07:34:27 am »
Download the source for SFML 1.6. Open the solution file and let VS convert it to  VS2010 format. Batch build all.

Yes, it'll work with VS Express.
/Peter Welzien

Dark Byte

  • Newbie
  • *
  • Posts: 30
    • View Profile
SFML Debug/Release with VC+ 2010 errors
« Reply #4 on: September 28, 2010, 11:19:22 pm »
Alright. I have just installed VC++ 2008 (it works w00t). But I will do that as I like 2010 more. And thanks for your help ;)

 

anything