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

Auteur Sujet: [Résolu] SFML 2.2 erreurs  (Lu 2263 fois)

0 Membres et 1 Invité sur ce sujet

Raitosan

  • Full Member
  • ***
  • Messages: 221
    • Voir le profil
    • E-mail
[Résolu] SFML 2.2 erreurs
« le: Avril 13, 2015, 07:40:09 pm »
Bonjour,
J'ai installer la SFML 2.2 sous windows 8.1 x64 (j'ai pris la version 32bits), je compile à l'aide de QT Creator car j'ai prévu de faire une application QT/SFML, mais à la compilation j'ai ce genre d'erreur:

19:29:53: Configuration inchangée, étape qmake sautée.
19:29:53: Débute : "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe"
C:/Qt/Tools/mingw491_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/Vincent/Documents/QT/build-POS_Editor-Desktop_Qt_5_4_1_MinGW_32bit-Debug'
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DSFML_STATIC -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I"..\POS_Editor" -I"." -I"C:\SFML\include" -I"C:\Qt\5.4\mingw491_32\include" -I"C:\Qt\5.4\mingw491_32\include\QtWidgets" -I"C:\Qt\5.4\mingw491_32\include\QtGui" -I"C:\Qt\5.4\mingw491_32\include\QtCore" -I"debug" -I"C:\Qt\5.4\mingw491_32\mkspecs\win32-g++"  -o debug\QSFMLCanvas.o ..\POS_Editor\src\QSFMLCanvas.cpp
g++ -Wl,-subsystem,windows -mthreads -o debug\POS_Editor.exe debug/main.o debug/Window.o debug/QSFMLCanvas.o debug/SFMLMap.o  -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -LC:/Qt/5.4/mingw491_32/lib -lqtmaind -LC:\mingw491\mingw32\lib -LC:\Utils\icu32_53_1_mingw482\lib -LC:\utils\postgresql\pgsql\lib -LC:\utils\mysql\mysql\lib -LC:\opensll\lib -lshell32 -LC:\Qt\5.4\mingw491_32/lib -LC:/SFML/lib -lsfml-audio-s-d -lsfml-graphics-s-d -lsfml-network-s-d -lsfml-system-s-d -lsfml-window-s-d -lQt5Widgetsd -lQt5Guid -lQt5Cored
C:/SFML/lib/libsfml-graphics-s-d.a(RenderWindow.cpp.obj): In function `ZNK2sf12RenderWindow7captureEv':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderWindow.cpp:92: undefined reference to `glReadPixels@28'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget5clearERKNS_5ColorE':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:99: undefined reference to `glClearColor@16'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:100: undefined reference to `glClear@4'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget4drawEPKNS_6VertexEjNS_13PrimitiveTypeERKNS_12RenderStatesE':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:269: undefined reference to `glVertexPointer@16'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:270: undefined reference to `glColorPointer@16'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:271: undefined reference to `glTexCoordPointer@16'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:280: undefined reference to `glDrawArrays@12'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget12pushGLStatesEv':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:299: undefined reference to `glGetError@0'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:309: undefined reference to `glPushClientAttrib@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:310: undefined reference to `glPushAttrib@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:312: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:313: undefined reference to `glPushMatrix@0'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:314: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:315: undefined reference to `glPushMatrix@0'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:316: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:317: undefined reference to `glPushMatrix@0'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget11popGLStatesEv':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:329: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:330: undefined reference to `glPopMatrix@0'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:331: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:332: undefined reference to `glPopMatrix@0'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:333: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:334: undefined reference to `glPopMatrix@0'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:336: undefined reference to `glPopClientAttrib@0'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:337: undefined reference to `glPopAttrib@0'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget13resetGLStatesEv':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:355: undefined reference to `__GLEW_ARB_multitexture'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:357: undefined reference to `__glewClientActiveTextureARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:358: undefined reference to `__glewActiveTextureARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:362: undefined reference to `glDisable@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:363: undefined reference to `glDisable@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:364: undefined reference to `glDisable@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:365: undefined reference to `glDisable@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:366: undefined reference to `glEnable@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:367: undefined reference to `glEnable@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:368: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:369: undefined reference to `glEnableClientState@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:370: undefined reference to `glEnableClientState@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:371: undefined reference to `glEnableClientState@4'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget16applyCurrentViewEv':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:407: undefined reference to `glViewport@16'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:410: undefined reference to `glMatrixMode@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:411: undefined reference to `glLoadMatrixf@4'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:414: undefined reference to `glMatrixMode@4'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget14applyBlendModeERKNS_9BlendModeE':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:424: undefined reference to `__GLEW_EXT_blend_func_separate'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:426: undefined reference to `__glewBlendFuncSeparateEXT'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:432: undefined reference to `glBlendFunc@8'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:437: undefined reference to `__GLEW_EXT_blend_equation_separate'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:439: undefined reference to `__glewBlendEquationSeparateEXT'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:445: undefined reference to `__glewBlendEquation'
C:/SFML/lib/libsfml-graphics-s-d.a(RenderTarget.cpp.obj): In function `ZN2sf12RenderTarget14applyTransformERKNS_9TransformE':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/RenderTarget.cpp:457: undefined reference to `glLoadMatrixf@4'
C:/SFML/lib/libsfml-graphics-s-d.a(GLCheck.cpp.obj): In function `ZN2sf4priv12glCheckErrorEPKcj':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/GLCheck.cpp:40: undefined reference to `glGetError@0'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `checkMaxTextureUnits':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:51: undefined reference to `glGetIntegerv@8'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `checkShadersAvailable':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:118: undefined reference to `__GLEW_ARB_shading_language_100'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:116: undefined reference to `__GLEW_ARB_shader_objects'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:117: undefined reference to `__GLEW_ARB_vertex_shader'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:118: undefined reference to `__GLEW_ARB_fragment_shader'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `ZN2sf6ShaderD2Ev':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:149: undefined reference to `__glewDeleteObjectARB'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `ZN2sf6Shader12setParameterERKSsf':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:266: undefined reference to `__glewGetHandleARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:267: undefined reference to `__glewUseProgramObjectARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:273: undefined reference to `__glewUniform1fARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:277: undefined reference to `__glewUseProgramObjectARB'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `ZN2sf6Shader12setParameterERKSsff':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:290: undefined reference to `__glewGetHandleARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:291: undefined reference to `__glewUseProgramObjectARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:297: undefined reference to `__glewUniform2fARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:301: undefined reference to `__glewUseProgramObjectARB'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `ZN2sf6Shader12setParameterERKSsfff':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:314: undefined reference to `__glewGetHandleARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:315: undefined reference to `__glewUseProgramObjectARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:321: undefined reference to `__glewUniform3fARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:325: undefined reference to `__glewUseProgramObjectARB'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `ZN2sf6Shader12setParameterERKSsffff':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:338: undefined reference to `__glewGetHandleARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:339: undefined reference to `__glewUseProgramObjectARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:345: undefined reference to `__glewUniform4fARB'
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:349: undefined reference to `__glewUseProgramObjectARB'
C:/SFML/lib/libsfml-graphics-s-d.a(Shader.cpp.obj): In function `ZN2sf6Shader12setParameterERKSsRKNS_9TransformE':
C:/Users/Vincent/Documents/SFML-2.2/src/SFML/Graphics/Shader.cpp:383: undefined reference to `__glewGetHandleARB'

Bon, j'ai pas tout mis car y'a un gros paquet de lignes... x)

Tout concerne OpenGL/Glew, mais normalement sous windows on a aucune librairie de ce genre à inclure ou quoi que ce soit, donc je ne comprend pas trop l'erreur :/

Mon fichier .pro contient bien ça pourtant:
DEFINES += SFML_STATIC

INCLUDEPATH += C:/SFML/include

LIBS += -LC:/SFML/lib

CONFIG(debug, debug|release)
{
    LIBS += -lsfml-audio-s-d -lsfml-graphics-s-d -lsfml-network-s-d -lsfml-system-s-d -lsfml-window-s-d
}

Merci d'avance!
« Modifié: Avril 13, 2015, 08:13:57 pm par Raitosan »

G.

  • Hero Member
  • *****
  • Messages: 1593
    • Voir le profil
Re : SFML 2.2 erreurs
« Réponse #1 le: Avril 13, 2015, 07:43:50 pm »
Tout concerne OpenGL/Glew, mais normalement sous windows on a aucune librairie de ce genre à inclure ou quoi que ce soit, donc je ne comprend pas trop l'erreur :/
En static si.
Jette un oeil au tutoriel sur codeblocks / minGW, y'a toute une partie sur ce qu'il faut link en static et dans quel ordre lier.

Raitosan

  • Full Member
  • ***
  • Messages: 221
    • Voir le profil
    • E-mail
Re : SFML 2.2 erreurs
« Réponse #2 le: Avril 13, 2015, 07:54:33 pm »
Ah ok >_>
Merci, on les inclus comment par contre du coup?

Edit: J'ai rajouter ça : LIBS += -lopenal32 -lglew -lsndfile -lwinmm -lws2_32 -lfreetype -ljpeg -lopengl32 -lgdi32
Mais maintenant j'ai des erreurs sur les thread et time/clock :/
« Modifié: Avril 13, 2015, 08:04:54 pm par Raitosan »

G.

  • Hero Member
  • *****
  • Messages: 1593
    • Voir le profil
Re : SFML 2.2 erreurs
« Réponse #3 le: Avril 13, 2015, 08:04:03 pm »
Inclure ? Y'a rien de plus à inclure.
Pour lier, avec Qt Creator et les .pro je ne sais pas, mais ça doit être de la même façon que tu lies SFML j'imagine. ;) (d'ailleurs tu lies pas SFML dans le bon ordre, system est censé venir après window)

Raitosan

  • Full Member
  • ***
  • Messages: 221
    • Voir le profil
    • E-mail
Re : SFML 2.2 erreurs
« Réponse #4 le: Avril 13, 2015, 08:06:00 pm »
AHHH t'es un dieu o/

Merci, la dernière erreur que j'ai obtenu malgré avoir linker tout ça venait du fait que system n'était pas au bon endroit x)

Merci :)