Forum de la communauté SFML

Aide => Général => Discussion démarrée par: Onigiri le Septembre 08, 2013, 08:24:41 pm

Titre: [Resolu] undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 08, 2013, 08:24:41 pm
Bonjour,

J'ai un projet qui marche sur un pc et sur un autre, aucune fenêtre s'affiche.
Apres quelques recherches, il s'agit d'un bug à cause des cartes graphiques (la mienne c'est NVidia)
La solution, c'était de compiler en statique mais il y a un autre problème qui survient:

F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Sprite.o):Sprite.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Sprite.o):Sprite.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Sprite.o):Sprite.cpp:(.text$_ZN2sf6SpriteD1Ev[sf::Sprite::~Sprite()]+0x155)||undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Sprite.o):Sprite.cpp:(.text$_ZN2sf6SpriteD0Ev[sf::Sprite::~Sprite()]+0x15d)||undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Sprite.o):Sprite.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Drawable.o):Drawable.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Image.o):Image.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Image.o):Image.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Image.o):Image.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Image.o):Image.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Image.o):Image.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Image.o):Image.cpp|| more undefined references to `_Unwind_Resume' follow|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(Image.o):Image.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp|| more undefined references to `_Unwind_Resume' follow|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(RenderTarget.o):RenderTarget.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(ImageLoader.o):ImageLoader.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(ImageLoader.o):ImageLoader.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(ImageLoader.o):ImageLoader.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(ImageLoader.o):ImageLoader.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(ImageLoader.o):ImageLoader.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(ImageLoader.o):ImageLoader.cpp|| more undefined references to `_Unwind_Resume' follow|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(ImageLoader.o):ImageLoader.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-graphics-s.a(GraphicsContext.o):GraphicsContext.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(VideoMode.o):VideoMode.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp|| more undefined references to `_Unwind_Resume' follow|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Context.o):Context.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(Context.o):Context.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(VideoModeSupport.o):VideoModeSupport.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp|| more undefined references to `_Unwind_Resume' follow|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp|| undefined reference to `_Unwind_Resume'|
F:\SFML\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp|| undefined reference to `_Unwind_Resume'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Laurent le Septembre 09, 2013, 09:33:09 am
Tu devrais vraiment passer à SFML 2.
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 09, 2013, 11:58:32 am
Pourquoi? Je ne fais que contourner le problème.

En plus, elle n'est pas encore fini
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Laurent le Septembre 09, 2013, 12:26:48 pm
Citer
Pourquoi?
Parce qu'elle n'a pas ce problème.

Citer
En plus, elle n'est pas encore fini
Si. On en est même à SFML 2.1.
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 10, 2013, 07:37:13 pm

Ok, je viens d'essayer et ca compile mais ca se lance pas. C'est quoi libstdc++-6.dll? C'est pas fourni?
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 10, 2013, 09:17:11 pm

Je viens de la trouver, mais ca segfault au lancement  :'(

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: F:\C++\TestSFML\
Adding source dir: F:\C++\TestSFML\
Adding file: bin\Debug\TestSFML.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.8
Child process PID: 15464
Program received signal SIGSEGV, Segmentation fault.
In std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> >::_Alloc_hider::_Alloc_hider (this=0x0, __dat=0x66086010, __a=@0x28faef) at D:\developpement\sfml\sfml\src\SFML\System\String.cpp:85 ()
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 10, 2013, 09:18:00 pm

A cette ligne:     sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Laurent le Septembre 10, 2013, 09:38:36 pm
Tu as téléchargé quelle archive de SFML ? Tu as quel compilo ? Tu as "trouvé" où libstdc++6.dll ? (c'est la bibliothèque standard C++, elle est fournie dans le répertoire "bin" de ton compilo)
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 10, 2013, 10:03:02 pm

Ca fait beaucoup de questions.

J'ai télécharger "SFML-2.1-windows-gcc-4.7-mingw-32bits.zip"

Mon compilo, c'est "mingw32-gcc-4.4.1"

J'ai trouvé libstdc++6.dll ici: https://code.google.com/p/wtfu/downloads/detail?name=libstdc%2B%2B-6.dll&can=2&q=

Et dans le répertoire bin de mon compilo, il n'y a pas de libstdc++-6.dll  :'(

Je code sous Code Blocks 10.05

Merci  :)

Titre: Re : undefined reference to _Unwind_Resume
Posté par: Laurent le Septembre 11, 2013, 07:37:31 am
Il faut recompiler SFML (ou passer à un compilo récent), aucune des versions précompilées ne sera compatible avec ton gcc 4.4.
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 11, 2013, 08:51:03 am

J'ai installé la version la plus récente: code blocks 12.11 et mingw32-gcc-4.7.1

J'ai refais les linkages et ca compile  :)

Mais j'ai ce message maintenant:

Le point d'entrée de procédure __gxx_personality_v0 est introuvable dans la bibliothèque de liens dynamiques libstdc++-6.dll.
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Laurent le Septembre 11, 2013, 08:59:05 am
Tu as bien pris le libstdc++-6.dll de ton compilo ? Tu as téléchargé quelle archive de SFML ? Peux-tu me montrer le résultat d'un "gcc -v" dans une console ?
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 11, 2013, 09:38:00 am

Ok, j'essayerai ce soir  :)
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 11, 2013, 06:20:33 pm

Oui, j'ai bien pris le libstdc++-6.dll de mon compilo qui est mingw32-gcc-4.7.1.

J'ai pris SFML-2.1-windows-gcc-4.7-mingw-32bits.zip

Donc je pense que c'est bon  ;)

Resultat de la compilation:

mingw32-g++.exe -Wall -fexceptions  -O2  -Wall -DSFML_DYNAMIC    -IF:\SFML\SFML-2.1\include  -c F:\C++\TestSFML\main.cpp -o obj\Release\main.o
mingw32-g++.exe -LF:\SFML\SFML-2.1\lib  -o bin\Release\TestSFML.exe obj\Release\main.o   -s  -lsfml-graphics -lsfml-window -lsfml-system
Output size is 329.50 KB
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings (0 minutes, 1 seconds)
 
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Laurent le Septembre 11, 2013, 07:24:54 pm
Tu as téléchargé ton compilo où ? Peux-tu me montrer le résultat d'un "gcc -v" dans une console ?
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 11, 2013, 07:42:24 pm

J'ai télécharger le compilo ici: http://www.codeblocks.org/downloads/26

J'ai pris: codeblocks-12.11mingw-setup.exe

Voici ce que j'obtient avec gcc -v:

-------------- Clean: Debug in TestSFML (compiler: GNU GCC Compiler)---------------

Cleaned "TestSFML - Debug"

-------------- Build: Debug in TestSFML (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -v  -g -DSFML_DYNAMIC    -IF:\SFML\SFML-2.1\include  -c F:\C++\TestSFML\main.cpp -o obj\Debug\main.o
Using built-in specs.
COLLECT_GCC=mingw32-g++.exe
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enable-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disable-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)
COLLECT_GCC_OPTIONS='-Wall' '-fexceptions' '-v' '-g' '-D' 'SFML_DYNAMIC' '-I' 'F:\SFML\SFML-2.1\include' '-c' '-o' 'obj\Debug\main.o' '-mtune=i386' '-march=i386'
 c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/cc1plus.exe -quiet -v -I F:\SFML\SFML-2.1\include -iprefix c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/ -D SFML_DYNAMIC F:\C++\TestSFML\main.cpp -quiet -dumpbase main.cpp -mtune=i386 -march=i386 -auxbase-strip obj\Debug\main.o -g -Wall -version -fexceptions -o C:\Users\Magail\AppData\Local\Temp\ccMyMBoj.s
GNU C++ (tdm-1) version 4.7.1 (mingw32)
   compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/mingw32"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/backward"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include-fixed"
ignoring nonexistent directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 F:\SFML\SFML-2.1\include
 c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++
 c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++/mingw32
 c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++/backward
 c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include
 c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/../../../../include
 c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include-fixed
End of search list.
GNU C++ (tdm-1) version 4.7.1 (mingw32)
   compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1b05afeca9d712f769248af52f554d5e
COLLECT_GCC_OPTIONS='-Wall' '-fexceptions' '-v' '-g' '-D' 'SFML_DYNAMIC' '-I' 'F:\SFML\SFML-2.1\include' '-c' '-o' 'obj\Debug\main.o' '-mtune=i386' '-march=i386'
 c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/as.exe -v -I F:\SFML\SFML-2.1\include -o obj\Debug\main.o C:\Users\Magail\AppData\Local\Temp\ccMyMBoj.s
GNU assembler version 2.22 (mingw32) using BFD version (GNU Binutils) 2.22
COMPILER_PATH=c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/;c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/
LIBRARY_PATH=c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/lib/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../
COLLECT_GCC_OPTIONS='-Wall' '-fexceptions' '-v' '-g' '-D' 'SFML_DYNAMIC' '-I' 'F:\SFML\SFML-2.1\include' '-c' '-o' 'obj\Debug\main.o' '-mtune=i386' '-march=i386'
mingw32-g++.exe -LF:\SFML\SFML-2.1\lib  -o bin\Debug\TestSFML.exe obj\Debug\main.o   -lsfml-graphics-d -lsfml-window-d -lsfml-system-d 
Output size is 742.16 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
 
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Laurent le Septembre 11, 2013, 08:47:12 pm
Ah, t'as juste le compilo fourni par Code::Blocks 12.11, fallait le dire. Dans ce cas la version SJLJ de SFML fera l'affaire.
Titre: Re : undefined reference to _Unwind_Resume
Posté par: Onigiri le Septembre 11, 2013, 08:59:01 pm

C'est bon  :) :) :)

Ca fonctionne!!!

Bon j'ai plus qu'à remplacer l'ancienne syntaxe de mes projet pour la SFML 2.

Merci Beaucoup
Titre: Re : [Resolu] undefined reference to _Unwind_Resume
Posté par: G. le Septembre 11, 2013, 11:47:07 pm
Note que le tutoriel sur compiler SFML sur codeblocks suggère fortement que la version de la SFML à utiliser avec le compilateur de base de c::b est la TDM SJLJ. ;)