SFML Compile Error in Code :: Blocks

1

I need to make a game for a college subject using the SFML library and the C ++ language. I followed that tutorial to set up the Code :: blocks, and pasted the following test file indicated in the tutorial:

#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;
}

However, when compiling, the following message is in the build log:

-------------- Build: Debug in sfml-15-05 (compiler: GNU GCC Compiler)---------------

Linking stage skipped (build target has no object files to link)
Nothing to be done (all items are up-to-date).

And when I click run, a text box appears saying It seems that this project has not been built yet. Do you want to build it now? . Clicking Yes, the window opens again. Clicking on no displays a console screen saying Process returned 4256912 (0x40F490) executin time : -0.000 s Press any key to continue.

The expected in the tutorial is that a window with a green circle appears.

I have already researched these errors but could not resolve them.

    
asked by anonymous 16.05.2017 / 22:12

0 answers