SFML community forums

Help => General => Topic started by: mimipim on December 07, 2010, 10:14:06 pm

Title: SFML 1.6 Setup With code::blocks (problem)
Post by: mimipim on December 07, 2010, 10:14:06 pm
I was reinstal my computre and now cant setup (again) SFML with last version of code::blocks.

In build options on my project, Realese -> Linker settings i set this:
Code: [Select]
-lsfml-audio-s
-lsfml-graphics-s
-lsfml-window-s
-lsfml-system-s


I already copied files to my codeblocks install folder.

But still reciving errors.
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: Revan1985 on December 07, 2010, 10:40:57 pm
have you defined SFML_DYNAMIC in the tab "Compiler Settings" ?
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: Breakman79 on December 08, 2010, 03:18:07 am
Quote from: "Revan1985"
have you defined SFML_DYNAMIC in the tab "Compiler Settings" ?


No, I don't think that's right.  He's linking with the static libraries not the dynamic ones.

Maybe you need to change the order the are libraries called in the linker.  I saw a similar issue in another post and it was solved by moving the graphics and window library before the audio and system.
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: mimipim on December 20, 2010, 10:35:02 am
Thanks for your replys friends. I try this now and it's still return "undefined reference to ...".

Please anyone help.
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: tntexplosivesltd on December 20, 2010, 10:47:57 am
Have you set your compiler search directories?
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: Laurent on December 20, 2010, 10:48:55 am
What version of gcc do you use? (type "mingw32-gcc -v" in a console to find out -- make sure that you do it from your Code::Blocks' MinGW/bin folder)
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: mimipim on December 20, 2010, 10:59:52 am
Hi to you.

The version is: "4.4.1 (TDM-2 mingw32)";

I want to tell you that now I link the libs in debuger too and when Build recive errors like:

Code: [Select]
C:\CPP\SFML\lib\libsfml-system-s.a(Platform.o):Platform.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: Laurent on December 20, 2010, 11:04:17 am
You must recompile SFML, or use the MinGW version given in the tutorial. Yours is not compatible with the one that was used to compile SFML 1.6.
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: mimipim on December 20, 2010, 11:27:56 am
Now work, thanks you a lot Laurent!
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: mimipim on December 20, 2010, 11:54:21 am
But I want to ask one more thing. Why when i built and run direct from C::B my program return message "Unable to load file pic.jpg".

If I run it from debug folder myself everything is okay.
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: Laurent on December 20, 2010, 12:16:32 pm
You must setup the working directory in the run options of your project.
Title: SFML 1.6 Setup With code::blocks (problem)
Post by: mimipim on December 20, 2010, 12:56:54 pm
Thanks for all Laurent.