Bonsoir,

donc voilà j'essaie de rajouter sfml à qt Creator mais je galère un peu si quelqu'un peut m'aider svp.

donc voilà ce que j'ai fais, j'ai télécharger sfml que j'ai rajouter a mon dans mon dossier C:

Nom : sfmllll.png
Affichages : 530
Taille : 21,4 Ko




ensuite j'ai créer un projet c++ :

avec comme fichier .pro :
Code Qt-pro : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
QT +=core
 
TARGET=biloutch
 
CONFIG += console
 
SOURCES += main.cpp
 
 
 
LIBS += -LC:\SFML-2.0\lib
 
INCLUDEPATH += C:\SFML-2.0\include
DEPENDPATH += C:\SFML-2.0\include
 
CONFIG(release, debug|release): LIBS += -lsfml-audio -lsfml-graphics -lsfml-main -lsfml-network -lsfml-window -lsfml-system
CONFIG(debug, debug|release): LIBS += -lsfml-audio-d -lsfml-graphics-d -lsfml-main-d -lsfml-network-d -lsfml-window-d -lsfml-system-d
 
CONFIG+=C++11
TEMPLATE=app


mon fichier main :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
#include <iostream>
#include <SFML/Graphics.hpp>
#include <QCoreApplication>
 
using namespace std;
 
int main(int argc, char* argv[])
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "HELLO");
        sf::RectangleShape rect;
        rect.setPosition(sf::Vector2f(235, 352));
        rect.setSize((sf::Vector2f(30, 30)));
        rect.setFillColor((sf::Color(33, 42, 231, 255)));
 
        while (window.isOpen())
        {
            sf::Event e;
            while (window.pollEvent(e))
            {
                if (e.type == sf::Event::Closed)
                {
                    window.close();
                }
            }
            window.clear();
            window.draw(rect);
            window.display();
        }
        return 0;
}
lorsque j'execute j'obtiens pas d'erreur, mais j'obtiens une console vide :

Nom : sfml_vide.png
Affichages : 415
Taille : 136,3 Ko

si quelqu'un peut m'aider svp