SFML community forums

Help => General => Topic started by: Khnemu on March 19, 2013, 07:25:56 pm

Title: Issues with codeblocks and sfml 2.0 (link/static lib)
Post by: Khnemu on March 19, 2013, 07:25:56 pm
Hi!
I'm trying to use SFML 2.0 with codeblocks ide and mingw. I downloaded the Windows 32 bits - GCC SJLJ (Code::Blocks) (15.7 MB) version of sfml 2.0.
I've set everything exactly like in http://www.sfml-dev.org/tutorials/2.0/start-cb.php except i've added the -s for static libs and defined SFML_STATIC. The main.cpp is the same.
For some reason, the debug won't compile because it doesn't find sf::renderwindow. I've double-checked everything and can't understand why it would compile under release and not under debug...

Also, the release version asks for the .dll files even though i've defined sfml_static and used the -s libs.
Quote:
The program can't start because sfml-graphics-2.dll is missing from your computer. Try reinstalling the program to fix this problem.

Any idea of what i'm doing wrong ?

edit:
For some reason (not sure what changed  :o ). It now compiles in debug.
However, both versions now just crash after having been launched.
I really don't understand what happens.

I guess i'm going to try recompiling sfml.
Title: Re: Issues with codeblocks and sfml 2.0 (link/static lib)
Post by: AlexAUT on March 19, 2013, 09:15:08 pm
Wich version of Codeblocks do you use? Because I had the exact same bug a few weeks ago...

If you use the newest 12.11 you have to recompile SFML by your own or download the right nightly build from exploid3r (
Nightly Builds: http://sfml.my-gate.net/nightly/)


AlexAUT
Title: Re: Issues with codeblocks and sfml 2.0 (link/static lib)
Post by: Khnemu on March 19, 2013, 11:30:54 pm
Yes i'm using the latest version.
I tried recompiling SFML but i'm stuck right now (undefined references errors for some reason).
Going to try the nightly builds and/or another compiler maybe.

edit:
I ended up re-installing visual studio and it works like a charm. I guess i'll stick with it  ;D