问题
I've recently set up qt creator to work with SFML, and I tried running a piece of code as a test to see if it works. I must note the code bellow works perfectly in Codeblocks IDE but in qt creator it simply displays a console with the text "Press RETURN to close this window..."
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>
using namespace std;
using namespace sf;
Window w(VideoMode(350,350,32), "Tic Tac Toe"); Event e1; const Input&
in1 = w.GetInput();
int main() {
while(w.IsOpened())
{
w.Display();
}
return EXIT_SUCCESS;
}
Here is my .pro file:
INCLUDEPATH += C:\SFML-1.6\include
LIBS += C:\SFML-1.6\lib\sfml-system.lib \
C:\SFML-1.6\lib\sfml-window.lib \
C:\SFML-1.6\lib\sfml-graphics.lib \
C:\SFML-1.6\lib\sfml-audio.lib \
C:\SFML-1.6\lib\sfml-network.lib
Never in a million years did I imagine working with SFML on my favorite IDE is so difficult, what is the problem?
来源:https://stackoverflow.com/questions/12132218/qt-creator-is-not-displaying-sfml-windows