Can you please tell me how I change it in Qt?
Cause if I click on "Projects" and change "Qt version" from "MSVC2010" to "Qt 4.8.1 for Desktop - MinGW" I get the error:
The program has unexpectedly finished.
I am so confused now lol...
What I exactly did:
1. I downloaden the SFML 2.0 Snapshot.
2. Unpacked it on my desktop.
3. Opened a MS-DOS Box and added my Cmake path (inside Qt folder) to the DOS Box.
4. Let Cmake unpack everything into a new folder
5. Browse to that "new" folder (build folder) through the DOS Box.
6. Give the command: mingw32-make.exe (went through without problems)
7. Give the command: mingw32-make.exe install (went through without problems)
8. Added (what is below) code to my .pro file
LIBS += -L"C:\Program Files (x86)\SFML\lib"
INCLUDEPATH = "C:\Program Files (x86)\SFML\include" -lsfml-window -lsfml-graphics -lsfml-system
Then I added this test code to my .cpp file:
#include <SFML/Graphics.hpp>
int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
// Start the game loop
while (window.isOpen())
{
// Process events
sf::Event event;
while (window.pollEvent(event))
{
// Close window : exit
if (event.type == sf::Event::Closed)
window.close();
}
// Clear screen
window.clear();
// Update the window
window.display();
}
return EXIT_SUCCESS;
}
When I click on (left side of screen) Project button in Qt (Qt SDK newest version) I have:
Edit build configuration: Qt 4.8.1 for Desktop - MSVC2010 (Qt SDK) Debug
Qt version: Qt 4.8.1 for Desktop - MSVC2010 (Qt SDK)
Tool chain: Microsoft Visual C++ Compiler 10.0 (x86)
I now get the error:
:-1: error: LNK1104: cannot open file 'sfml-window.lib'
When I change the Qt version to (for example) MinGW, it says something about backslashes when I try to save and run the program.
Hope you (or anyone) can help me out
Never had this problem in the past ; ;