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

Author Topic: SFML with QT - No window showing.  (Read 1501 times)

0 Members and 1 Guest are viewing this topic.

drandell

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
SFML with QT - No window showing.
« on: September 18, 2012, 03:12:11 am »
Hi guys,

New to the forums, new to sfml and it seems i've run into a brick wall here.
So i've been trying now for the past 20 minutes to try and get SFML's initial tutorial running. I am just to say not using anything related to the QT SDK, just using the IDE, currently all i get on compile is the following command prompt;
http://i.imgur.com/x3Nfx.png

The code compiles fine it seems, so, here's my project file'
Code: [Select]
INCLUDEPATH += "D:\SFML\include"
LIBS += -L"D:\SFML\lib" -lsfml-graphics -lsfml-window -lsfml-network -lsfml-audio -lsfml-system

SOURCES += main.cpp

And the main.cpp file;
#include<SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}
 

Honestly not sure were im going wrong, any help is greatly appreciated, just really want to get up and running :D.

*As for what version, im using SFML 2.0 RC, using the Visual C++ 2010 build, my compiler it set to us my visual c++ 2010 compiler in the projects file so i don't really know where i am going wrong here  :-\

Weeve

  • Jr. Member
  • **
  • Posts: 87
  • C++ Programmer (Intermediate), 3D Artist (Skilled)
    • View Profile
    • Email
Re: SFML with QT - No window showing.
« Reply #1 on: January 08, 2013, 05:28:59 pm »
I had to manually move the SFML files into my Qt includes bin, and drag the .dll into my system32 to get it working properly, as Qt does not search the entire computer for include files, if that is not the case for you, and you have already done that, please post your errors to give us a better understand of what you mean
Long live rapid project development! -- Kestrel3D Game-Engine nearing completion