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

Author Topic: MinGW, Eclipse, all tutoria programs compile, but not working  (Read 1328 times)

0 Members and 1 Guest are viewing this topic.

Marcin

  • Newbie
  • *
  • Posts: 2
    • View Profile
MinGW, Eclipse, all tutoria programs compile, but not working
« on: February 09, 2016, 03:57:07 am »
I'm pretty new in programming and i'm just starting with SFML, i configured Eclipse so it compile all tutorial programs, but when i try to run them from under Eclipse, they start and right away shut down without any error (yes, i know about loop holding windows), when i'm trying to run it from system (after adding all missing dll's) i'm getting error window "This application is unable to start correctly..."
Windows 10

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: MinGW, Eclipse, all tutoria programs compile, but not working
« Reply #1 on: February 09, 2016, 10:43:10 am »
Can you provide the code you're trying to run?

And is "This application is unable to start correctly" the full error message?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Marcin

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: MinGW, Eclipse, all tutoria programs compile, but not working
« Reply #2 on: February 12, 2016, 01:44:26 am »
#include <SFML/Graphics.hpp>

int main()
{
        // create the window
        sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

        // run the program as long as the window is open
        while (window.isOpen())
        {
                // check all the window's events that were triggered since the last iteration of the loop
                sf::Event event;
                while (window.pollEvent(event))
                {
                        // "close requested" event: we close the window
                        if (event.type == sf::Event::Closed)
                                window.close();
                }

                // clear the window with black color
                window.clear(sf::Color::Black);

                // draw everything here...
                // window.draw(...);

                // end the current frame
                window.display();
        }

        return 0;
}
 

It's just random code that i found in one of tutorials


Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: MinGW, Eclipse, all tutoria programs compile, but not working
« Reply #3 on: February 12, 2016, 05:30:10 am »
Are you using the libraries built with exactly the same version as you are using? (Which compiler version and which version of SFML are you using?)

Did you build SFML yourself from source?
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*