SFML community forums

Help => General => Topic started by: fakepotato on September 30, 2014, 06:42:06 pm

Title: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 06:42:06 pm
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?
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 06:49:14 pm
(http://rghost.ru/58285957/image.png)
Title: Re: The program exiting with code -1073741515
Post by: Nexus on September 30, 2014, 07:09:17 pm
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.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 07:12:15 pm
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?
Title: Re: The program exiting with code -1073741515
Post by: Hapax on September 30, 2014, 08:27:26 pm
Tried reading this (http://qt-project.org/forums/viewthread/26203)?

Looks like you may have a "double MinGW installation". Try properly removing the old one (the one before you installed qt).

This information was found by googling "exited with code -1073741515"  >:(
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 09:06:17 pm
Tried reading this (http://qt-project.org/forums/viewthread/26203)?

Looks like you may have a "double MinGW installation". Try properly removing the old one (the one before you installed qt).

This information was found by googling "exited with code -1073741515"  >:(
I have 4.8.2 that came with installed QTcreator, and second one installed manually(4.7.0)
But had this problem even with only one mingw.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 09:14:20 pm
Btw, does anybody work with SFML in QTcreator? I have heard it works awkwardly with qtcreator.
Title: Re: The program exiting with code -1073741515
Post by: Jesper Juhl on September 30, 2014, 09:22:20 pm
Why would a library (any library) work "awkwardly" with any specific IDE?
Regardless of whether you use Visual Studio project files, SCons, CMake, QMake or plain old make files, when you do a build you eventually call out to a compiler (and no, the IDE is not the compiler) and need to tell it things like where to find includes and where to find libraries. How you configure that is obviously different depending on your build system, but should be pretty identical from library to library. Your IDE may present an interface to do that configuration (or it may not) but again it shouldn't be any different for SFML than any other library.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 09:24:45 pm
I know QTcreator is only IDE.
Still i am too stupid to make it work in QTcreator. Damnit, tried everything.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 09:56:00 pm
Used this guide (http://https://github.com/SFML/SFML/wiki/Tutorial:-Compile-and-Link-SFML-with-Qt-Creator).
Can't understand 6 step. Don't have any of C:\QtSDK\mingw\bin;C:\qtsdk\qt\bin; or similar to them in any path
Now i am reinstalling the QT and wanna try to do everything accordingly to this guide once more
Title: Re: The program exiting with code -1073741515
Post by: Hapax on September 30, 2014, 10:20:14 pm
Used this guide (http://https://github.com/SFML/SFML/wiki/Tutorial:-Compile-and-Link-SFML-with-Qt-Creator).
Here is that link fixed (https://github.com/SFML/SFML/wiki/Tutorial:-Compile-and-Link-SFML-with-Qt-Creator).

Can't understand 6 step. Don't have any of C:\QtSDK\mingw\bin;C:\qtsdk\qt\bin; or similar to them in any path
In step 6, it says insert that, not that it should be there already.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 10:31:14 pm
4.8.2 mingw is compatible with sfml? Cuz i am trying to get 4.7.0 to make it work.
Maybe i am doing extra motions?
Title: Re: The program exiting with code -1073741515
Post by: Jesper Juhl on September 30, 2014, 10:38:45 pm
I use SFML with GCC 4.8.2 on RedHat 6.5 (via devtoolsets2) and it works fine. So the answer to that question would be "yes".
Title: Re: The program exiting with code -1073741515
Post by: Hapax on September 30, 2014, 10:46:30 pm
I use SFML with GCC 4.8.2 on RedHat 6.5 (via devtoolsets2) and it works fine. So the answer to that question would be "yes".
I would assume that you're using the latest github version and I would also assume that Vladkomarr is using the 2.1 pre-built version (which is for 4.7 and probably why they're trying to use that).

Vladkomarr, have you tried to build yourself SFML from the latest source (https://github.com/SFML/SFML)? If you're uncomfortable with building, you could try downloading a pre-built version from Nightly Builds (http://www.nightlybuilds.ch/).
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 11:11:40 pm
Yup, tried to cmake it twice. Same exiting code.
Btw, if i remove the IDE with maintenance tool, that means i delete the compiler mingw from system too? Cuz the guy above said that this exiting code means i have double mingw installation. So i ll try reinstalling qtcreator  :-X
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on September 30, 2014, 11:11:59 pm
I use SFML with GCC 4.8.2 on RedHat 6.5 (via devtoolsets2) and it works fine. So the answer to that question would be "yes".
Thanx you too.
Title: Re: The program exiting with code -1073741515
Post by: Hapax on October 01, 2014, 05:01:13 am
Yup, tried to cmake it twice. Same exiting code.
...the guy above said...
Actually, it was me  :P

I don't know if the compiler is removed when removing the IDE. It looks like you should check that when you remove it again  ;D
Title: AW: The program exiting with code -1073741515
Post by: eXpl0it3r on October 01, 2014, 07:39:30 am
Start the debugger, see where it crashes.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on October 01, 2014, 10:40:24 am
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)
Title: Re: The program exiting with code -1073741515
Post by: eXpl0it3r on October 01, 2014, 11:00:40 am
Provide the call stack.

Also do you have a graphics driver installed?
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on October 01, 2014, 11:07:15 am
Sure.
Btw, in Visual Studio everything works correctly.
Title: Re: The program exiting with code -1073741515
Post by: eXpl0it3r on October 01, 2014, 11:30:10 am
Provide the call stack.

I still think there's a library mismatch (i.e. SFML built for GCC 4.7 or something and you using GCC 4.8.2).
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on October 01, 2014, 11:52:50 am
If i understand you correctly..
Toogled stack in windows->views, while debugging the threads are empty. Put breakpoint at line 8

(http://rghost.ru/58295411/image.png)
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on October 01, 2014, 11:58:18 am
The guy above says his sfml(gcc 4.7.0 compatible) works with 4.8.2 too..
seems like i need to install <5.0 version of qtcreator with 4.7 gcc
Title: Re: The program exiting with code -1073741515
Post by: eXpl0it3r on October 01, 2014, 01:49:03 pm
You should never mix different compiler versions.
Just build SFML for the right compiler, no need to change QtCreator.

If an application crashes, there needs to be a call stack. You could also run gdb directly from the command line, run your application, let it crash and get the call stack with the command bt.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on October 01, 2014, 04:13:03 pm
Decided to use MS studio instead creator in sfml case.
Can someone close topic? Thx for everyone above.
Title: Re: The program exiting with code -1073741515
Post by: Jesper Juhl on October 01, 2014, 05:30:22 pm
The guy above says his sfml(gcc 4.7.0 compatible) works with 4.8.2 too..
seems like i need to install <5.0 version of qtcreator with 4.7 gcc
I said that SFML works with GCC 4.8.2 and I meant the SFML source. I did not say that the pre-built SFML binaries work. They were build with a different compiler version and I wouldn't expect them to work.
I built SFML from source (a recent github snapshot) with GCC 4.8.2 so that it does work.
Title: Re: The program exiting with code -1073741515
Post by: Mörkö on October 01, 2014, 06:40:43 pm
Btw, does anybody work with SFML in QTcreator? I have heard it works awkwardly with qtcreator.
Yes daily. I use QT Creator + cmake.

Before I switched to cmake, I did have some trouble sometimes where QMake would require me to run `Clean All` first instead of just building in order to compile all updated files, but I don't remember the specific circumstances of when that would happen.
Title: Re: The program exiting with code -1073741515
Post by: fakepotato on October 04, 2014, 01:09:44 am
Damn, it works perfect in QTcreator on linux.