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

Author Topic: Can't get SFML set up in qt creator  (Read 6835 times)

0 Members and 1 Guest are viewing this topic.

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Can't get SFML set up in qt creator
« on: January 07, 2013, 04:11:17 pm »
I've followed STEP BY STEP exactly the exact same way it is here, followed the tutorial perfectly: downloaded cmake, added the executable to the options/cmake, then I opened a new project based on Cmakelist, built both the release and debug configurations and this is my project's .pro file:

TEMPLATE = app
CONFIG += console
CONFIG -= qt

SOURCES += main.cpp

LIBS += -LF:\SFML-2.0-rc\qtcreator-build\lib
INCLUDEPATH += F:\SFML-2.0-rc\qtcreator-build\src

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

However I am getting this error:
C1083: Cannot open include file: 'SFML/Graphics.hpp' no such file or directory.

Please help, it has been ages since I've been trying to set up SFML for my favorite IDE :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't get SFML set up in qt creator
« Reply #1 on: January 07, 2013, 05:00:03 pm »
Quote
INCLUDEPATH += F:\SFML-2.0-rc\qtcreator-build\src
\include seems better than \src here ;)
Laurent Gomila - SFML developer

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Can't get SFML set up in qt creator
« Reply #2 on: January 07, 2013, 05:49:50 pm »
Quote
INCLUDEPATH += F:\SFML-2.0-rc\qtcreator-build\src
\include seems better than \src here ;)

There's no include directory, but I followed the tutorial step by step exactly as it's shown here

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Can't get SFML set up in qt creator
« Reply #3 on: January 07, 2013, 06:36:05 pm »
I followed the tutorial step by step exactly as it's shown here
It's not an official tutorial, so don't rely on it to work properly. You should probably rather read the official tutorials and try to adapt them to your needs.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Can't get SFML set up in qt creator
« Reply #4 on: January 07, 2013, 06:40:49 pm »
I followed the tutorial step by step exactly as it's shown here
It's not an official tutorial, so don't rely on it to work properly. You should probably rather read the official tutorials and try to adapt them to your needs.

There's no tutorials on that page for qt creator, qt creator is one of the best C++ IDEs if you ask me, I really want to get it set-up properly

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Can't get SFML set up in qt creator
« Reply #5 on: January 07, 2013, 08:42:55 pm »
I solved it by myself, the tutorial was probably outdated, all I did was download SFML 2.0, unrar it on my disk, and added this to my .pro file:

INCLUDEPATH += F:/SFML-2.0-rc/include

LIBS += F:\SFML-2.0-rc\lib\sfml-system.lib \
    F:\SFML-2.0-rc\lib\sfml-window.lib \
    F:\SFML-2.0-rc\lib\sfml-graphics.lib \
    F:\SFML-2.0-rc\lib\sfml-audio.lib \
    F:\SFML-2.0-rc\lib\sfml-network.lib

I thank you laurent for your fast answer, I solved it in the end :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't get SFML set up in qt creator
« Reply #6 on: January 07, 2013, 09:27:34 pm »
Quote
There's no include directory, but I followed the tutorial step by step exactly as it's shown here
After compiling you get a build tree full of sh*t. You must build the install target to get a clean release directory with headers and everything. This is explained in the official tutorial.
Laurent Gomila - SFML developer

Kiecker

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Can't get SFML set up in qt creator
« Reply #7 on: June 15, 2016, 07:41:22 am »
Here I made a video on how to add SFML to Qt creator:

Law

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re : Can't get SFML set up in qt creator
« Reply #8 on: October 25, 2016, 06:13:38 pm »
Hello, how should we get this to work with SFML 2.4 now? The "libs" directory no longer exists, it has been replaced by "extlibs" with different subdirectories; files like sfml-window.lib are nowhere to be found.

Thank you.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't get SFML set up in qt creator
« Reply #9 on: October 25, 2016, 06:47:34 pm »
Nothing has changed in SFML 2.4. "extlibs" has always been there, and, as its name suggests, contains the external libraries (SFML dependencies). "libs" will be created upon successful compilation / installation. Please follow the tutorials and everything will be fine.
Laurent Gomila - SFML developer