SFML community forums

Help => General => Topic started by: ERROR on June 13, 2013, 09:59:53 pm

Title: SFML 2.0 in QT Creator
Post by: ERROR on June 13, 2013, 09:59:53 pm
Hey Guys,
I am using SFML 2.0 in QT Creator 2.7.0. Well, actually I would like to ;).

I dowloaded this : http://sfml-dev.org/download/sfml/2.0/SFML-2.0-windows-gcc-4.7-mingw-32bits.zip
I am using MinGW 4.7 in QT Creator.

And this is the code in my .pro file:

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp


# SFML
CONFIG(release, debug|release): LIBS += -lsfml-audio -lsfml-graphics -lsfml-network -lsfml-window -lsfml-system
CONFIG(debug, debug|release): LIBS += -lsfml-audio-d -lsfml-graphics-d -lsfml-network-d -lsfml-window-d -lsfml-system-d

# Windows
LIBS += -LE:/Coden/SFML/SFML_2_MinGW/lib
INCLUDEPATH += E:/Coden/SFML/SFML_2_MinGW/include
DEPENDPATH += E:/Coden/SFML/SFML_2_MinGW/include
 

And this is the code in the main.cpp
#include <iostream>
#include <SFML/Graphics.hpp>
using namespace std;

int main()
{
    sf::VideoMode VMode(500,800);
    sf::RenderWindow Window(VMode,"Stoppuhr"); //Creating window
    while(Window.isOpen())
    {
        Window.clear();
        Window.display();
    }
    cout << "Hello World!" << endl;
    return 0;
}

It builds properly, but when I start the program the window doesn't even show up. There is just the cmd which says "Press enter to close the window". If I start in Debug I get this error message:"During start up program exited with code 0x0000135"

Could anyone please help me out with that?

Additional infomation:
I tried this on my PC and on my Laptop.
Both are state of the art ;)
SFML runs in VS (with another SFML folder I did not mix them or anything)
I tried it for days now.Please somebody help me
Title: Re: SFML 2.0 in QT Creator
Post by: ERROR on June 17, 2013, 11:51:35 pm
I am sorry, but I have to push this thread.

It just won't work. I tried it for days now with all kinds of other setups in the pro file, but still the same. I also tried other SFML bindings but nothing helped. I have also rewritten my first post and I hope it is now good enough ;)
Title: Re: SFML 2.0 in QT Creator
Post by: Dragonsoulj on July 27, 2013, 07:01:30 am
This is what helped me to get it running:

https://github.com/SFML/SFML/wiki/Tutorial%3A-Compile-and-Link-SFML-with-Qt-Creator
Title: Re: SFML 2.0 in QT Creator
Post by: Kiecker on June 12, 2016, 12:44:43 am
What did you use for the build path for the cmake file
/*where it says to build the cmake file to C:\QtSDK\mingw\bin;C:\qtsdk\qt\bin; */
Title: Re: SFML 2.0 in QT Creator
Post by: Kiecker on July 07, 2016, 01:33:20 pm
I made a video on how to add sfml to qt creator.
https://www.youtube.com/watch?v=VWvD4mUpyfU
I know it is bad :P