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

Author Topic: SFML 2.0 in QT Creator  (Read 8141 times)

0 Members and 1 Guest are viewing this topic.

ERROR

  • Newbie
  • *
  • Posts: 7
    • View Profile
SFML 2.0 in QT Creator
« 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
« Last Edit: June 17, 2013, 11:48:33 pm by ERROR »

ERROR

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SFML 2.0 in QT Creator
« Reply #1 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 ;)

Dragonsoulj

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: SFML 2.0 in QT Creator
« Reply #2 on: July 27, 2013, 07:01:30 am »

Kiecker

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: SFML 2.0 in QT Creator
« Reply #3 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; */

Kiecker

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: SFML 2.0 in QT Creator
« Reply #4 on: July 07, 2016, 01:33:20 pm »
I made a video on how to add sfml to qt creator.

I know it is bad :P

 

anything