I have the trouble. My OS is windows7 x64, trying to get my SFML WD (for gcc 4.7.0) working
But it doesn't. Simple code
#include <iostream>
#include <conio.h>
#include <SFML/Graphics.hpp>
using namespace std;
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Hello World - SFML");
return 0;
}
And Project1\build-untitled-Desktop_Qt_5_3_MinGW_32bit-Debug\debug\untitled.exe exited with code -1073741515
What's wrong? Can show my .pro file too.
TEMPLATE = app
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
include(deployment.pri)
qtcAddDeployment()
#SFML library
LIBS += -LD:\QTcreator\Tools\SFML-2.1\lib
CONFIG(release, debug|release): LIBS += -lsfml-audio -lsfml-graphics -lsfml-main -lsfml-network -lsfml-window -lsfml-system -DSFML_STATIC
CONFIG(debug, debug|release): LIBS += -lsfml-audio-d -lsfml-graphics-d -lsfml-main-d -lsfml-network-d -lsfml-window-d -lsfml-system-d -DSFML_STATIC
INCLUDEPATH += D:\QTcreator\Tools\SFML-2.1\include
DEPENDPATH += D:\QTcreator\Tools\SFML-2.1\include
Can anyone help me?
What's the problem?
That code creates a window and destroys it immediately. Have a look at the tutorials to learn how to keep a SFML window open.
You mean, there's no problem?
Found this code on the wiki
#include <SFML/Graphics.hpp>
using namespace std;
int main()
{
// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Hello World - SFML");
// Start the main loop
while (App.isOpen())
{
// Process events
sf::Event Event;
while (App.pollEvent(Event))
{
// Close window : exit
if (Event.type == sf::Event::Closed)
App.close();
}
// Clear screen, and fill it with blue
App.clear(sf::Color::Blue);
// Display the content of the window on screen
App.display();
}
return 0;
}
The same exit with code.
You still think it's code trouble?
Started debugger, at line 8
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Hello World - SFML");
exited with code 0xc0000135
Btw here's my output for gcc -v.
(http://rghost.ru/58294507/image.png)