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

Author Topic: Game.exe has stopped working  (Read 1728 times)

0 Members and 1 Guest are viewing this topic.

Nickmiste

  • Newbie
  • *
  • Posts: 3
    • View Profile
Game.exe has stopped working
« on: February 23, 2013, 08:27:41 pm »
I have installed SFML to Code::Blocks (MinGW), and then I went to test it with the code from the tutorial. I press build and run, and the console comes up. A few seconds later, A window pops up saying game.exe has stopped working. What do I do?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Game.exe has stopped working
« Reply #1 on: February 23, 2013, 08:45:32 pm »
You should give more information on the exacte code and how you setup Code::Blocks.
Further more start the debugger and see what actualy goes on.
Also are you processing the events?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nickmiste

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Game.exe has stopped working
« Reply #2 on: February 23, 2013, 09:09:55 pm »
The code I'm testing with is as follows:

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}
 


I also ran the debugger:

#0 691C4AF9   sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int) () (C:\Users\User\Desktop\Game\Workspace\Game\bin\Debug\sfml-window-2.dll:??)
#1 00401416   main() (C:\Users\User\Desktop\Game\Workspace\Game\main.cpp:5)


When installing SFML, I first tried 1.6, but when that didn't work (same reason as now), I tried SFML 2.0. I followed the instructions on the website saying how to install it very carefully. I tried the debug and release configurations, and the .dll's are in both the debug and release folder with game.exe. That's about all I know.


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Game.exe has stopped working
« Reply #3 on: February 23, 2013, 09:45:15 pm »
The code is fine, so ot seems to be your environment. From where did you get SFML and what's the version of C::B and MinGW?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nickmiste

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Game.exe has stopped working
« Reply #4 on: February 23, 2013, 11:07:19 pm »
Sorry I took so long to reply. I got SFML from the main website. My Code::Blocks version is 12.11. My MinGW version is 4.7.1 i believe.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Game.exe has stopped working
« Reply #5 on: February 23, 2013, 11:17:00 pm »
You'll have to recompile SFML again, or use my nightly build.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything