Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML 1.6 Setup With code::blocks (problem)  (Read 4366 times)

0 Members and 2 Guests are viewing this topic.

mimipim

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« 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.

Revan1985

  • Newbie
  • *
  • Posts: 4
    • MSN Messenger - davide_galli_420@hotmail.it
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #1 on: December 07, 2010, 10:40:57 pm »
have you defined SFML_DYNAMIC in the tab "Compiler Settings" ?
Best Regards
    Davide Galli

* - junior c# programmer
* - base c++/opengl programmer
* - near having a motorbike.

Breakman79

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #2 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.

mimipim

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #3 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.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #4 on: December 20, 2010, 10:47:57 am »
Have you set your compiler search directories?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 1.6 Setup With code::blocks (problem)
« Reply #5 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)
Laurent Gomila - SFML developer

mimipim

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #6 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'|

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 1.6 Setup With code::blocks (problem)
« Reply #7 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.
Laurent Gomila - SFML developer

mimipim

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #8 on: December 20, 2010, 11:27:56 am »
Now work, thanks you a lot Laurent!

mimipim

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #9 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 1.6 Setup With code::blocks (problem)
« Reply #10 on: December 20, 2010, 12:16:32 pm »
You must setup the working directory in the run options of your project.
Laurent Gomila - SFML developer

mimipim

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFML 1.6 Setup With code::blocks (problem)
« Reply #11 on: December 20, 2010, 12:56:54 pm »
Thanks for all Laurent.

 

anything