Qt Creator is not displaying SFML windows

╄→гoц情女王★ 提交于 2019-12-11 14:28:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!