Answer the question
In order to leave comments, you need to log in
Is it possible to use SFML in a QT project?
I barely found a way to connect SFML to the Qt Creator environment at all. I was already delighted, but then I tried to push code that uses both qt and sfml into the project and nothing worked. The fact is that in order to connect sfml to qt creator, you need to change the .pro file (well, transfer the sfml folder to the right places), I wrote this there:
TEMPLATE = app
CONFIG -= qt
CONFIG += console
LIBS += -L/Users/vladimirkorsunov/QtProjects/untitled/untitled/Contents/Frameworks/
CONFIG (release, debug|release): LIBS += -lsfml-audio -lsfml-graphics -lsfml-network -lsfml-window -lsfml-system
CONFIG (debug, debug|release): LIBS += -lsfml-audio -lsfml-graphics -lsfml-network -lsfml-window -lsfml-system
INCLUDEPATH += /Users/vladimirkorsunov/QtProjects/untitled/
DEPENDPATH += /Users/vladimirkorsunov/QtProjects/untitled/
Answer the question
In order to leave comments, you need to log in
This is where you disable Qt
CONFIG -= qt
If you need Qt libraries, then this line should be removed and added something like (depending on which modules you need)
QT += core gui widgets network
Next, SFML is connected as a regular static or dynamic library.
In INCLUDEPATH you specify the path to the *.h files of the library. In LIBS you specify which libraries will be linked against. Don't forget that if you don't specify link paths in LIBS, they must be specified in QMAKE_LIBDIR.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question