SFML community forums

Help => General => Topic started by: Kain5056 on May 24, 2013, 12:21:09 pm

Title: Can't get SFML to work in Code::Blocks!
Post by: Kain5056 on May 24, 2013, 12:21:09 pm
I'm trying to Install and Configure SFML to use it with Code::Blocks, but I can't get it to work.

I have followed THIS (http://www.sfml-dev.org/tutorials/2.0/start-cb.php) Tutorial perfectly, but every time I try to run the example program, it crashed giving me this error:

Process terminated with status -1073741819

Also, even though I linked it to the Static version, it still wants the graphics-2, system-2 and window-2 dlls.

I'm not very experienced with programming in general, so if someone could help me to get it to work it would be very appreciated.

Thank you in advance.  :)
Title: Re: Can't get SFML to work in Code::Blocks!
Post by: Laurent on May 24, 2013, 12:30:32 pm
Quote
I have followed THIS Tutorial perfectly, but every time I try to run the example program, it crashed giving me this error:
Which archive of SFML did you download, and which compiler are you using (if you're using the MinGW version provided with Code::Blocks, please tell us which version of Code::Blocks you have)?

Quote
Also, even though I linked it to the Static version, it still wants the graphics-2, system-2 and window-2 dlls.
What did you do to use the static version?
Title: Re: Can't get SFML to work in Code::Blocks!
Post by: Kain5056 on May 24, 2013, 01:13:04 pm
I have downloaded the GCC 4.7 TDM (SJLJ) - 32 bits version of SFML. I have codeblocks-12.11mingw-setup.exe (http://www.codeblocks.org/downloads/26) installed, and I use the MinGW version provided with it.

To link it to the Static version, I have added "sfml-graphics-s-d", "sfml-window-s-d" and "sfml-system-s-d" to the Linker settings for the project, "sfml-graphics-s", "sfml-window-s" and "sfml-system-s" for the Release and "sfml-graphics-d", "sfml-window-d" and "sfml-system-d" for the Debug, and also added "SFML_STATIC" in the "#defines" at the Compiler Settings for the project, the Release and the Debug. :-)

EDIT: I finally got it to work perfectly. Turns out all I had to do was to rebuild the project.
I apologize for wasting your time.