I'm not entirely sure where this question should go. Since this is my first attempt at building a project with this configuration I thought I would put it in General. It may belong in Window.
I have installed Qt.5.2.1 based on MVSC 2010, 32bit. I also have installed SFML 2.1 based on MVSC 2010, 32bit. I am new to Qt and Qt Creator but have been building successful example projects for a couple weeks now. I am a Java programmer with some C++ education in the past. I'm just now getting into it in a serious way. My development is for a specific application that will run only in a windows 7 environment. I needed access to Joystick input. After several days of research I came across SFML. It appears to be just what I am looking for.
I set up a very simple project in Qt with a main window. In the MainWindow constructor I put the following code:
if(sf::Joystick::isConnected(0))
qDebug() << "Joystick 1 is connected";
else
qDebug() << "Can't find a joystick";
The include is:
#include <SFML/Window.hpp>
In my project file I have:
LIBS += -L"C:/SFML-2.1/lib/" -lsfml-window-d
INCLUDEPATH += "C:/SFML-2.1/include"
DEPENDPATH += "C:/SFML-2.1/include"
It builds without error. However when I try to run it from Qt Creator it crashes. The actual messages are:
Starting D:\QT-Projects\examples\build-JoystickSFML-Desktop_Qt_5_2_1_MSVC2010_32bit_OpenGL-Debug\debug\JoystickSFML.exe...
The program has unexpectedly finished.
D:\QT-Projects\examples\build-JoystickSFML-Desktop_Qt_5_2_1_MSVC2010_32bit_OpenGL-Debug\debug\JoystickSFML.exe crashed
What am I doing wrong?