Bienvenue, Invité. Merci de vous connecter ou de vous inscrire.
Avez-vous perdu votre e-mail d'activation ?

Auteur Sujet: Erreur de Compilation... [Résolu]  (Lu 3344 fois)

0 Membres et 2 Invités sur ce sujet

DipStax

  • Newbie
  • *
  • Messages: 10
    • Voir le profil
Erreur de Compilation... [Résolu]
« le: Septembre 29, 2017, 11:45:26 pm »
Bonjour, j'essais d'installer SFML depuis pas mal de temps mais je n'y arrive pas. J'ai c'est message d'erreur qui s'affiche, quand j'utilise le code d'exemple dans le tuto:

C:\Program Files (x86)\SFML-2.4.2\lib\libsfml-s.a(CircleShape.cpp.odj):CircleShape.cpp           unefined reference to '_Unwind_Resume'C:\Program Files (x86)\SFML-2.4.2\lib\libsfml-s.a(CircleShape.cpp.odj):CircleShape.cpp:(.text$_ZN2sfllCircleShapeD0Ev[__ZN2sfllCircleShapeD0Ev]+0x24)           unefined reference to 'operator delete(void*, unsigned int)'
J'ai installer Code::Block version 16.01 avec la dernier version de GCC et la version x32 MinGW de SFML, tout les paramétrés de compilation son comme présenté dans le tuto. Donc merci de m'aidé.  ;)
« Modifié: Septembre 30, 2017, 08:43:39 pm par DipStax »

blacksages

  • Newbie
  • *
  • Messages: 15
    • Voir le profil
Re: Erreur de Compilation...
« Réponse #1 le: Septembre 29, 2017, 11:58:58 pm »
Si y'a un undefined reference alors que tu utilises une fonction de la bibliothèque sf, c'est qu'au niveau du linkage y'a un soucis, tu peux faire un screen de tes liens? (dans ton linker settings)
L'ordre dans lequel tu as mis les liens est important.

De bas en haut, dans release, j'ai:
(click to show/hide)
« Modifié: Septembre 30, 2017, 12:03:15 am par blacksages »

Guillaume__

  • Newbie
  • *
  • Messages: 42
    • Voir le profil
Re: Erreur de Compilation...
« Réponse #2 le: Septembre 30, 2017, 08:08:01 am »
Salut DipStax,

La dernière version de MinGW est la version 7.1.0, or la version compilée de SFML proposée dans la section de téléchargement est la version 6.1.0. Essayes de compiler toi-même SFML via ce tutoriel.

Si toutefois ça ne corrige pas ton problème, montres-nous ton code source minimal que l'on voit si des erreurs ne se sont pas glissés dedans :)

Cordialement G
Rejoignez-nous sur le serveur
Discord SFML

DipStax

  • Newbie
  • *
  • Messages: 10
    • Voir le profil
Re: Erreur de Compilation...
« Réponse #3 le: Septembre 30, 2017, 12:17:03 pm »
Voila le screens de mes link settings, avec bien sur les paramètres généraux le SFML_STATIC dans #defines et les liens de compilation et de linkages.

Et pour de ce qui est du re-compilage de SFML moi même, j’essayerai si tout mes link son bon. Mais j'ai déjà commencé à regarder et je n'y comprend rien...  ???
« Modifié: Septembre 30, 2017, 12:27:15 pm par DipStax »

blacksages

  • Newbie
  • *
  • Messages: 15
    • Voir le profil
Re: Erreur de Compilation...
« Réponse #4 le: Septembre 30, 2017, 06:05:27 pm »
C'est noté dans le tuto: "Il est important de lier les bibliothèques qui correspondent à la configuration : "sfml-xxx-d" pour Debug, et "sfml-xxx" pour Release. Un mauvais mélange pourrait produire des crashs."

je ne vois pas le -d chez toi^^

DipStax

  • Newbie
  • *
  • Messages: 10
    • Voir le profil
Re: Erreur de Compilation...
« Réponse #5 le: Septembre 30, 2017, 07:50:12 pm »
Ban j'ai bien mis les -d mais maintenant j'ai tout c'est erreur:
mingw32-g++.exe -L"C:\Program Files (x86)\SFML-2.4.2\lib" -o bin\Debug\tst_SFML.exe obj\Debug\main.o   -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d -lopengl32 -lfreetype -ljpeg -lwinmm -lgdi32
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(CircleShape.cpp.obj): In function `ZN2sf11CircleShapeC2Efj':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/CircleShape.cpp:37: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(CircleShape.cpp.obj): In function `ZN2sf11CircleShapeD0Ev':
D:/sfml-release/_Sources/SFML/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `operator delete(void*, unsigned int)'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(CircleShape.cpp.obj):CircleShape.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(RenderWindow.cpp.obj): In function `ZN2sf12RenderWindowC2Ev':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderWindow.cpp:35: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(RenderWindow.cpp.obj): In function `ZN2sf12RenderWindowC2ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderWindow.cpp:42: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(RenderWindow.cpp.obj): In function `ZN2sf12RenderWindowC2EP6HWND__RKNS_15ContextSettingsE':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderWindow.cpp:50: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(RenderWindow.cpp.obj): In function `ZN2sf12RenderWindowD0Ev':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderWindow.cpp:61: undefined reference to `operator delete(void*, unsigned int)'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(RenderWindow.cpp.obj): In function `ZNK2sf12RenderWindow7captureEv':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderWindow.cpp:83: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(RenderWindow.cpp.obj):RenderWindow.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Shape.cpp.obj): In function `ZN2sf5ShapeD0Ev':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Shape.cpp:60: undefined reference to `operator delete(void*, unsigned int)'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Shape.cpp.obj): In function `ZN2sf5ShapeC2Ev':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Shape.cpp:169: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):Shape.cpp:(.eh_frame+0x257): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):Shape.cpp:(.eh_frame$_ZNSt6vectorIN2sf6VertexESaIS1_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Shape.cpp.obj):Shape.cpp:(.eh_frame$_ZNSt12_Vector_baseIN2sf6VertexESaIS1_EED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTargetD0Ev':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/RenderTarget.cpp:95: undefined reference to `operator delete(void*, unsigned int)'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj): In function `ZN2sf7TextureC2Ev':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Texture.cpp:72: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj): In function `ZN2sf7TextureC2ERKS0_':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Texture.cpp:88: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj): In function `ZN2sf7Texture6createEjj':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Texture.cpp:140: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj): In function `ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Texture.cpp:211: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj): In function `ZN2sf7Texture14loadFromMemoryEPKvjRKNS_4RectIiEE':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Texture.cpp:219: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj):D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Texture.cpp:227: more undefined references to `_Unwind_Resume' follow
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj):Texture.cpp:(.eh_frame+0x53): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj):Texture.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEEC1ERKS1_+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj):Texture.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj):Texture.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEEC1EjRKS0_+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj):Texture.cpp:(.eh_frame$_ZNSt12_Vector_baseIhSaIhEEC2EjRKS0_+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Texture.cpp.obj):Texture.cpp:(.eh_frame$_ZNSt12_Vector_baseIhSaIhEED2Ev+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZN2sf11VertexArrayC2ENS_13PrimitiveTypeEj':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/VertexArray.cpp:45: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZNSt6vectorIN2sf6VertexESaIS1_EEC1EjRKS2_':
C:/Dev/MinGW32-PosixDwarf610r0/lib/gcc/i686-w64-mingw32/6.1.0/include/c++/bits/stl_vector.h:280: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZNSt12_Vector_baseIN2sf6VertexESaIS1_EEC2EjRKS2_':
C:/Dev/MinGW32-PosixDwarf610r0/lib/gcc/i686-w64-mingw32/6.1.0/include/c++/bits/stl_vector.h:135: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZNSt6vectorIN2sf6VertexESaIS1_EE17_M_default_appendEj':
C:/Dev/MinGW32-PosixDwarf610r0/lib/gcc/i686-w64-mingw32/6.1.0/include/c++/bits/vector.tcc:569: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZNSt6vectorIN2sf6VertexESaIS1_EE19_M_emplace_back_auxIJRKS1_EEEvDpOT_':
C:/Dev/MinGW32-PosixDwarf610r0/lib/gcc/i686-w64-mingw32/6.1.0/include/c++/bits/vector.tcc:427: undefined reference to `_Unwind_Resume'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):C:/Dev/MinGW32-PosixDwarf610r0/lib/gcc/i686-w64-mingw32/6.1.0/include/c++/bits/stl_uninitialized.h:522: more undefined references to `_Unwind_Resume' follow
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj): In function `ZN2sf11VertexArrayD0Ev':
D:/sfml-release/_Sources/SFML/include/SFML/Graphics/VertexArray.hpp:45: undefined reference to `operator delete(void*, unsigned int)'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame+0x4b): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame$_ZNSt6vectorIN2sf6VertexESaIS1_EEC1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame$_ZNSt6vectorIN2sf6VertexESaIS1_EEC1EjRKS2_+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame$_ZNSt12_Vector_baseIN2sf6VertexESaIS1_EEC2EjRKS2_+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame$_ZNSt6vectorIN2sf6VertexESaIS1_EE15_M_erase_at_endEPS1_+0x13): undefined reference to `__gxx_personality_v0'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(VertexArray.cpp.obj):VertexArray.cpp:(.eh_frame$_ZNSt6vectorIN2sf6VertexESaIS1_EE17_M_default_appendEj+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(Transformable.cpp.obj): In function `ZN2sf13TransformableD0Ev':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/Transformable.cpp:51: undefined reference to `operator delete(void*, unsigned int)'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(GLCheck.cpp.obj): In function `ZN2sf4priv12glCheckErrorEPKcjS2_':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:45: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:46: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:47: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:54: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:55: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:61: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:62: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:68: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)'
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(GLCheck.cpp.obj):D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:69: more undefined references to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)' follow
C:\Program Files (x86)\SFML-2.4.2\lib/libsfml-graphics-s-d.a(GLCheck.cpp.obj): In function `ZN2sf4priv12glCheckErrorEPKcjS2_':
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned int) const'
D:/sfml-release/_Sources/SFML/src/SFML/Graphics/GLCheck.cpp:104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned int, unsigned int) const'
Process terminated with status 1 (0 minute(s), 8 second(s))
50 error(s), 0 warning(s) (0 minute(s), 8 second(s))

DipStax

  • Newbie
  • *
  • Messages: 10
    • Voir le profil
Re: Erreur de Compilation...
« Réponse #6 le: Septembre 30, 2017, 08:40:39 pm »
En faite tout est bon j'ai essais de changer de version de SFML et voir ce avec les différents type de MinGW de Code::Block et sa marche!!! Merci quand même! ;)

 

anything