SFML community forums

Help => General => Topic started by: Gan on January 08, 2013, 07:42:48 am

Title: Can't get SFML with Code::Blocks working
Post by: Gan on January 08, 2013, 07:42:48 am
I've done the tutorial for setting up SFML with Code::Blocks 3 times already and I've ran into many issues. Most I was able to fix by downloading the latest Mingw and setting the compiler to it.

However I can now build static and dynamic builds of the example project perfectly, but when I run it, it just says the application stopped working.
Here's the output:
Quote
Checking for existence: C:\Users\Matthew\Desktop\SFML\Game Client\bin\Debug\Game Client.exe
Executing: "C:\Users\Matthew\Desktop\SFML\Game Client\bin\Debug\Game Client.exe"  (in C:\Users\Matthew\Desktop\SFML\Game Client\.)
Process terminated with status -1073741819 (0 minutes, 2 seconds)
In fact, stepping line-by-line in debugger mode shows it gets to the first line:
Quote
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
Before stopping.

Any ideas?
Title: Re: Can't get SFML with Code::Blocks working
Post by: Laurent on January 08, 2013, 07:55:00 am
You must recompile SFML.
Title: Re: Can't get SFML with Code::Blocks working
Post by: Gan on January 08, 2013, 09:35:57 am
:D Thanks, worked perfectly!

I love all the work you've done. SFML is amazing. I ported my project from Processing to SFML C++ and it runs 20* faster! And I think SFML is easier too.
Title: Re: Can't get SFML with Code::Blocks working
Post by: Kain5056 on May 24, 2013, 11:20:26 am
Hello, I'm experiencing the exact same error when I try to run my first SFML application.
The problem is, I don't really know how to recompile SFML. I tried following THIS (http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php) tutorial but the instructions are not clear and I don't really know what to do.

If someone could help, I would really appreciate it.  ;D

Thank you in advance!  :)
Title: Re: Can't get SFML with Code::Blocks working
Post by: Laurent on May 24, 2013, 11:27:12 am
What exactly don't you understand in the tutorial?

By the way, now that SFML 2.0 has been released, there's most likely a compiled package that matches your compiler, you don't need to recompiler it.
Title: Re: Can't get SFML with Code::Blocks working
Post by: Kain5056 on May 24, 2013, 11:43:01 am
What exactly don't you understand in the tutorial?

Well, I don't know how to add the MinGW\bin directory to the PATH. I don't even know what the Tutorial means by it.

I'm not very experienced with programming in general.

By the way, now that SFML 2.0 has been released, there's most likely a compiled package that matches your compiler, you don't need to recompiler it.

I downloaded the GCC 4.7 TDM (SJLJ) - 32 bits package, following the Installing SFML Tutorial for Code::Blocks, but when I try to run the example program it crashes giving me this error:

Process terminated with status -1073741819

It also wants the graphics-2, system-2 etc dlls to be in the directory, even though I linked it to the static version.

EDIT:

It seems that you're doing several things wrong. You should open a new thread for all these problems.

Done! :-)
Title: Re: Can't get SFML with Code::Blocks working
Post by: Laurent on May 24, 2013, 11:55:09 am
It seems that you're doing several things wrong. You should open a new thread for all these problems.