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

Author Topic: Statically Linking Issues [not quite resolved]  (Read 11250 times)

0 Members and 1 Guest are viewing this topic.

daz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Statically Linking Issues [not quite resolved]
« on: May 26, 2010, 05:41:40 am »
I believe I followed the tutorial over here accurately (c::b, windows): http://sfml-dev.org/tutorials/1.6/start-cb.php
Global compiler options set, project build settings set (with -s on the end of them), build mode set to release... but when I try to compile, it spews out a lot of stuff at me:
Code: [Select]

D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x799)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x7f9)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x8e8)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x91c)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x9a0)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x9e4)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xaaa)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xb52)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xbfa)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xece)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x115e)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(VideoMode.o):VideoMode.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x625)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x686)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x6c3)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x94f)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x97b)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(Context.o):Context.cpp:(.text+0x108)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Context.o):Context.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(VideoModeSupport.o):VideoModeSupport.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x4e7)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0xd08)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x121e)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1346)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x146e)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1584)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x15cc)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1760)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x17a3)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x17d0)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x17d8)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x197c)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1c24)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1c5e)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1d02)||undefined reference to `std::ostream& std::ostream::_M_insert<unsigned long>(unsigned long)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1dd0)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1e0d)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x225c)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x2624)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x273a)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x2852)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x2a92)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(Joystick.o):Joystick.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-system-s.a(Clock.o):Clock.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-system-s.a(Platform.o):Platform.cpp:(.text+0xca)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-system-s.a(Platform.o):Platform.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
||=== Build finished: 49 errors, 0 warnings ===|


My source is simply:
Code: [Select]

#include <SFML/Window.hpp>
int main()
{
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
    bool running = true;
    while(running) {
        App.Display();
    }
    return EXIT_SUCCESS;
}

Starting as a CMD line project...


I found another topic, and it appears this is likely the cause of incompatible gcc versions. Yay!

Jakman4242

  • Newbie
  • *
  • Posts: 18
    • MSN Messenger - ninjamasterjack@nctv.com
    • View Profile
    • http://www.vgcats.com/
Statically Linking Issues [not quite resolved]
« Reply #1 on: May 26, 2010, 07:01:28 am »
The information in that topic didn't solve my static linking issues, they persisted even after following all that developed in the topic.

I'm still trying to figure it out, myself.

daz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Statically Linking Issues [not quite resolved]
« Reply #2 on: May 26, 2010, 07:09:58 am »
Well, after downloading the specific version of MingW and changing c::b to use the compiler, this remains for me:

Code: [Select]

obj\Release\main.o:main.cpp:(.text+0x3f)||undefined reference to `__gxx_personality_sj0'|
obj\Release\main.o:main.cpp:(.text+0x53)||undefined reference to `_Unwind_SjLj_Register'|
obj\Release\main.o:main.cpp:(.text+0x180)||undefined reference to `_Unwind_SjLj_Unregister'|
obj\Release\main.o:main.cpp:(.text+0x1e5)||undefined reference to `_Unwind_SjLj_Resume'|
obj\Release\main.o:main.cpp:(.text+0x234)||undefined reference to `_Unwind_SjLj_Resume'|
||=== Build finished: 5 errors, 0 warnings ===|


Better than 49 errors, I suppose...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Statically Linking Issues [not quite resolved]
« Reply #3 on: May 26, 2010, 09:35:16 am »
Do you use gcc 4.4, as said at the beginning of the tutorial?
Laurent Gomila - SFML developer

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Statically Linking Issues [not quite resolved]
« Reply #4 on: May 26, 2010, 01:12:40 pm »
I recommend downloading the one Laurent has prepackaged.

I tried doing it manually and I kept getting errors so I just gave up. I eventually want to figure it out, but I'm more interested in writing code with my time right now.

daz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Statically Linking Issues [not quite resolved]
« Reply #5 on: May 26, 2010, 03:55:19 pm »
Quote from: "Laurent"
Do you use gcc 4.4, as said at the beginning of the tutorial?

Yes, I downloaded it from the link mentioned at the beginning of the tutorial (http://sfml-dev.org/tutorials/mingw-with-gcc-4.4.zip)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Statically Linking Issues [not quite resolved]
« Reply #6 on: May 26, 2010, 04:08:41 pm »
There's probably something wrong with your MinGW/SFML installations, because those undefined symbols that you have belong to gcc 3.4 (SJLJ is the old gcc way of implementing the exception system, this is what makes gcc 4 and gcc 3 incompatible).
Laurent Gomila - SFML developer

Jakman4242

  • Newbie
  • *
  • Posts: 18
    • MSN Messenger - ninjamasterjack@nctv.com
    • View Profile
    • http://www.vgcats.com/
Statically Linking Issues [not quite resolved]
« Reply #7 on: May 27, 2010, 05:12:33 am »
I'm still confundled.

I have the latest SVN version of SFML, compiled using the batch process, and when I attempt to build my project I still get those undefined errors like on the first post.

My MinGW version is 4.4, the version supplied on the tutorial. I also made sure to rebuild the libraries with MinGW 4.4 installed.

[EDIT] Well, no, they're not the same, actually.


I know I'm not forgetting to link properly, because I've checked over that constantly. (-lsfml-system-s, -lsfml-window-s, -lsfml-graphics-s, -lsfml-audio-s)

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Statically Linking Issues [not quite resolved]
« Reply #8 on: May 27, 2010, 06:06:45 am »
Quote from: "Jakman4242"
I'm still confundled.

I have the latest SVN version of SFML, compiled using the batch process, and when I attempt to build my project I still get those undefined errors like on the first post.

My MinGW version is 4.4, the version supplied on the tutorial. I also made sure to rebuild the libraries with MinGW 4.4 installed.

[EDIT] Well, no, they're not the same, actually.


I know I'm not forgetting to link properly, because I've checked over that constantly. (-lsfml-system-s, -lsfml-window-s, -lsfml-graphics-s, -lsfml-audio-s)
Are you including the proper files?
I use the latest build of SFML2

Jakman4242

  • Newbie
  • *
  • Posts: 18
    • MSN Messenger - ninjamasterjack@nctv.com
    • View Profile
    • http://www.vgcats.com/
Statically Linking Issues [not quite resolved]
« Reply #9 on: May 27, 2010, 06:39:53 am »
Well, it's interesting. With the system lib test in the setup tutorial, it builds and runs no problem. Yet most of the errors I'm getting are system lib related. When I try to use another package, say, Window or Graphics, I get errors. Of course I include the system as well to double check.

*shrugs*

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Statically Linking Issues [not quite resolved]
« Reply #10 on: May 27, 2010, 08:44:52 am »
It seems like you include SFML 2.0 headers and link to SFML 1.6 libraries. Indeed, sf::Err and sf::ThreadLocal do not exist in SFML 1.6.
Laurent Gomila - SFML developer

Jakman4242

  • Newbie
  • *
  • Posts: 18
    • MSN Messenger - ninjamasterjack@nctv.com
    • View Profile
    • http://www.vgcats.com/
Statically Linking Issues [not quite resolved]
« Reply #11 on: May 30, 2010, 08:34:34 pm »
I'm using SFML2.0 libraries and headers.
When I remove the -s from each linker option and put SFML_DYNAMIC back it, it all runs fine.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Statically Linking Issues [not quite resolved]
« Reply #12 on: May 30, 2010, 10:49:12 pm »
Quote
I'm using SFML2.0 libraries and headers.

So why is it in D:\SFML-1.6? ;)
Laurent Gomila - SFML developer

Jakman4242

  • Newbie
  • *
  • Posts: 18
    • MSN Messenger - ninjamasterjack@nctv.com
    • View Profile
    • http://www.vgcats.com/
Statically Linking Issues [not quite resolved]
« Reply #13 on: May 31, 2010, 12:25:34 am »
That would have been funny if I had a D drive. :)

C:\Users\Jack\Code\sfml2\... It must be SFML 1.6~!

Well, really. I have 2 different SFML2 bases saved(svn current and snapshot), and neither will work. I've made sure I'm compiling SFML2.

Maybe I should just give up at this point. lol.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Statically Linking Issues [not quite resolved]
« Reply #14 on: May 31, 2010, 08:56:15 am »
Sorry, I just realized that you were not the OP :lol:
Laurent Gomila - SFML developer