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

Author Topic: Static linking issues  (Read 3473 times)

0 Members and 1 Guest are viewing this topic.

sirckopo

  • Newbie
  • *
  • Posts: 7
  • Le Virtual Catto
    • View Profile
Static linking issues
« on: December 21, 2014, 07:01:32 am »
Codeblocks 13.12, SFML 2.1 -> 2.2 x86 (static), Win7 x64. A random project.
Ok, i've just switched to 2.2 and added exactly all the libraries listed in the tutorial. Got errors, moved these libraries after SFML' ones, and...
What the hell is that?
// ... compiling to *.o ...
mingw32-g++.exe -LC:\SFML-2.2\lib -o bin\Release\ckChessie.exe <... *.o ...>  -static-libstdc++ -s  -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -ljpeg -lglew -lfreetype -lopengl32 -lgdi32 -lwinmm
C:\SFML-2.2\lib/libsfml-graphics-s.a(ImageLoader.cpp.obj):ImageLoader.cpp:(.text+0x11204): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0xb66): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0xebc): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0x27c6): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj):String.cpp:(.text+0x2bd0): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\SFML-2.2\lib/libsfml-system-s.a(String.cpp.obj): bad reloc address 0x13 in section `.text.unlikely'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation

Some advice, or it is on your side?

God, seems that someone has declared war on static linking...  :-\
/* My cat, as it turns out, is an excellent debugger, and she has helped me solve a number of nasty bugs when I talked to her about them. */
John Robbins, Debugging Applications, Microsoft Press,

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: Static linking issues
« Reply #1 on: December 21, 2014, 07:18:08 am »
What file did you download for Code::Blocks and what file did you download for SFML?
« Last Edit: December 21, 2014, 12:34:30 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

sirckopo

  • Newbie
  • *
  • Posts: 7
  • Le Virtual Catto
    • View Profile
Re: AW: Static linking issues
« Reply #2 on: December 21, 2014, 07:26:20 am »
What filw did you download for Code::Blocks and what file did you downliad for SFML?

Well, Code::Blocks is without compiler (which is MinGW GCC 4.8.1).
And SFML is "GCC 4.9.2 MinGW (DW2) - 32-bit"...

And I already got that issue. So, gonna update MinGW right now.
Thank you very much for this little draw. brb
/* My cat, as it turns out, is an excellent debugger, and she has helped me solve a number of nasty bugs when I talked to her about them. */
John Robbins, Debugging Applications, Microsoft Press,

sirckopo

  • Newbie
  • *
  • Posts: 7
  • Le Virtual Catto
    • View Profile
Re: Static linking issues
« Reply #3 on: December 21, 2014, 08:09:21 am »
Ok, updated with mingw-w64 4.9.2 x686, changed project options, rebuilt with 2.2, now it works.
Some type and antialiasing issues, though, but it's not that bad.
The topic may be closed now.
/* My cat, as it turns out, is an excellent debugger, and she has helped me solve a number of nasty bugs when I talked to her about them. */
John Robbins, Debugging Applications, Microsoft Press,