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

Author Topic: App.Clear(); SFML Crash  (Read 1871 times)

0 Members and 1 Guest are viewing this topic.

CL90

  • Newbie
  • *
  • Posts: 12
    • View Profile
App.Clear(); SFML Crash
« on: February 06, 2012, 09:43:01 am »
Hi somehow SFML crashes when i use App.Clear();...

Code: [Select]
#include <SFML/Graphics.hpp>
#include <windows.h>


int main(){
sf::RenderWindow App(sf::VideoMode::GetDesktopMode(), "Test Program", sf::Style::Resize|sf::Style::Close);
App.SetSize(800, 600) ;

while(App.IsOpened()){

sf::Event Event;
while (App.GetEvent(Event)){
if (Event.Type == sf::Event::Closed)
App.Close();
}
//App.Clear(sf::Color(200, 0, 0, 0));
//App.Clear(sf::Color(200, 0, 0));
//App.Clear();
App.Display();
Sleep(100);
}
    return 0;
}


Here u can see that i've tryed some different App.Clears..

I'm running MSVC++ 2010 Ult.
- and Linked 3 Libs.
    - sfml-graphics.dll
    - sfml-system.dll
    - sfml-window.dll
- no errors while building
- App. Clear(), no crash.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
App.Clear(); SFML Crash
« Reply #1 on: February 06, 2012, 09:54:04 am »
You must recompile SFML.

If you want more details, search the huge amount of posts related to this issue on the forum.
Laurent Gomila - SFML developer

CL90

  • Newbie
  • *
  • Posts: 12
    • View Profile
App.Clear(); SFML Crash
« Reply #2 on: February 06, 2012, 10:44:12 am »
Thanks!
i googled for a tutorial to compile the libs. and fount precompiled ones for VC++ 2010 in this tutorial:
http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition-Part-1.aspx

jeffclune

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://JeffClune.com
App.Clear(); SFML Crash
« Reply #3 on: February 16, 2012, 01:55:45 am »
Quote from: "Laurent"
You must recompile SFML.

If you want more details, search the huge amount of posts related to this issue on the forum.


Hello. I am also seeing my SFML (v1.6) application crash on App.Clear(). I did a make clean, and re-downloaded the 1.6 Mac OS X 64 bit libraries.

They don't require any compilation themselves. By "you have to recompile", do you just mean do a "make clean" on your project? I am using Xcode.

Any other ideas for what I can do? Should I try the 2.0 SFML?

Thank you very much for you r help.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
App.Clear(); SFML Crash
« Reply #4 on: February 16, 2012, 08:19:15 am »
Quote
By "you have to recompile", do you just mean do a "make clean"

This topic is only about Visual C++. You should never have to recompile for Mac OS X, unless the downloaded binaries don't match your platform (but I think they do, 1.6 has universal binaries if I remember correctly).

And no, "recompile" doesn't mean "clean", it means "make" -- and it's about SFML, not your project ;)
Laurent Gomila - SFML developer