alors premierement, j'ai telecharger la seule version 64 bits qu'il y ai de gcc pour windows(car mon pc et en 54 bits) et qui plus est c'est la version TDM SJLJ qui semble etre ce que code::blocks requiert, donc de ce coté il ne devrai pas y avoir de soucis.
je fait toujours comme le dit le tutoriel, dans la limite de ce que le tutoriel précise bien entendu. dans "linker settings -> link librairies(la colonne de gauche) le tout en mode release, je ne précise que "sfml-graphics" (pour le module graphique, et idem pour les autres), et c'est ainsi que je faisait sous ubuntu 12.04 et sa fonctionnait tres bien. (je précise que j'ai du passer a ubuntu 13.04 a cause d'un bug sous 12.04 m'interdisant le mode graphique, enfin bref sa n'est pas le sujet). cela en ne recompilant pas, et en indiquant directement les /include et /lib présent dans le dossier extrait de l'archive télécharger sur la page précedement mentionnée. si je fait ainsi avec comme code l'exemple du tutoriel, voila l'erreur:
build log:
-------------- Clean: Release in test SFML (compiler: GNU GCC Compiler)---------------
Cleaned "test SFML - Release"
-------------- Build: Release in test SFML (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -O2 -IC:\Users\Varden\Desktop\Programmation\SFML-2.1\include -IC:\Users\Varden\Desktop\Programmation\SFML-2.1\include -I"C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML" -c "C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp" -o obj\Release\Main.o
mingw32-g++.exe -LC:\Users\Varden\Desktop\Programmation\SFML-2.1\lib -LC:\Users\Varden\Desktop\Programmation\recompil-test\lib -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib\SFML" -o "bin\Release\test SFML.exe" obj\Release\Main.o -s -lsfml-system -lsfml-window -lsfml-graphics -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system
obj\Release\Main.o:Main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x1): undefined reference to `_imp___ZTVN2sf11CircleShapeE'
obj\Release\Main.o:Main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x11): undefined reference to `_imp___ZN2sf5ShapeD2Ev'
obj\Release\Main.o:Main.cpp:(.text.startup+0xb6): undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
obj\Release\Main.o:Main.cpp:(.text.startup+0xee): undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
obj\Release\Main.o:Main.cpp:(.text.startup+0x128): undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
obj\Release\Main.o:Main.cpp:(.text.startup+0x192): undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'
obj\Release\Main.o:Main.cpp:(.text.startup+0x19a): undefined reference to `_imp___ZN2sf5Color5GreenE'
obj\Release\Main.o:Main.cpp:(.text.startup+0x1b3): undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'
obj\Release\Main.o:Main.cpp:(.text.startup+0x1ca): undefined reference to `_imp___ZNK2sf6Window6isOpenEv'
obj\Release\Main.o:Main.cpp:(.text.startup+0x1f3): undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
obj\Release\Main.o:Main.cpp:(.text.startup+0x217): undefined reference to `_imp___ZN2sf6Window5closeEv'
obj\Release\Main.o:Main.cpp:(.text.startup+0x247): undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
obj\Release\Main.o:Main.cpp:(.text.startup+0x25f): undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
obj\Release\Main.o:Main.cpp:(.text.startup+0x265): undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
obj\Release\Main.o:Main.cpp:(.text.startup+0x27e): undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
obj\Release\Main.o:Main.cpp:(.text.startup+0x28d): undefined reference to `_imp___ZN2sf6Window7displayEv'
obj\Release\Main.o:Main.cpp:(.text.startup+0x2bd): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
obj\Release\Main.o:Main.cpp:(.text.startup+0x3ce): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
18 errors, 0 warnings (0 minutes, 1 seconds)
build messages:
||=== test SFML, Debug ===|
obj\Debug\Main.o||In function `main':|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|5|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|6|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|7|undefined reference to `_imp___ZN2sf5Color5GreenE'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|7|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|15|undefined reference to `_imp___ZN2sf6Window5closeEv'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|12|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|18|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|18|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|19|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|19|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|20|undefined reference to `_imp___ZN2sf6Window7displayEv'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|9|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
obj\Debug\Main.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\Users\Varden\Desktop\Programmation\SFML-2.1\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\Users\Varden\Desktop\Programmation\SFML-2.1\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\Users\Varden\Desktop\Programmation\SFML-2.1\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'|
||=== Build finished: 20 errors, 0 warnings (0 minutes, 1 seconds) ===|
si pour l'adresse des lib, je précise le dossier "lib" créer lors de la recompilation, sa me donne exactement la meme chose, que je recompiler en précisant juste minGW ou minGW code::blocks.
si je refait la meme chose mais avec la version SFML-2.1 GCC 4.7 TDM (SJLJ) - 32 bits, sa compile et l'exemple du tutoriel marche. j'ai essayer l'exemple pong, sa fonctionne, mais l'exemple opengl me renvoie ceci:
build log:
-------------- Clean: Release in test SFML (compiler: GNU GCC Compiler)---------------
Cleaned "test SFML - Release"
-------------- Build: Release in test SFML (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -O2 -IC:\Users\Varden\Desktop\Programmation\SFML-2.1-32bit\include -IC:\Users\Varden\Desktop\Programmation\SFML-2.1\include -I"C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML" -c "C:\Users\Varden\Desktop\Programmation\codeblocks\SFML-2.1\test SFML\Main.cpp" -o obj\Release\Main.o
mingw32-g++.exe -LC:\Users\Varden\Desktop\Programmation\SFML-2.1-32bit\lib -LC:\Users\Varden\Desktop\Programmation\recompil-test\lib -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib\SFML" -o "bin\Release\test SFML.exe" obj\Release\Main.o -s -lsfml-system -lsfml-window -lsfml-graphics -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system
obj\Release\Main.o:Main.cpp:(.text.startup+0x465): undefined reference to `glGenTextures@8'
obj\Release\Main.o:Main.cpp:(.text.startup+0x47d): undefined reference to `glBindTexture@8'
obj\Release\Main.o:Main.cpp:(.text.startup+0x4f4): undefined reference to `gluBuild2DMipmaps@28'
obj\Release\Main.o:Main.cpp:(.text.startup+0x513): undefined reference to `glTexParameteri@12'
obj\Release\Main.o:Main.cpp:(.text.startup+0x532): undefined reference to `glTexParameteri@12'
obj\Release\Main.o:Main.cpp:(.text.startup+0x556): undefined reference to `glEnable@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x563): undefined reference to `glDepthMask@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x578): undefined reference to `glClearDepth@8'
obj\Release\Main.o:Main.cpp:(.text.startup+0x586): undefined reference to `glDisable@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x5cb): undefined reference to `glViewport@16'
obj\Release\Main.o:Main.cpp:(.text.startup+0x5da): undefined reference to `glMatrixMode@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x5e0): undefined reference to `glLoadIdentity@0'
obj\Release\Main.o:Main.cpp:(.text.startup+0x674): undefined reference to `glFrustum@48'
obj\Release\Main.o:Main.cpp:(.text.startup+0x683): undefined reference to `glEnable@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x69a): undefined reference to `glBindTexture@8'
obj\Release\Main.o:Main.cpp:(.text.startup+0x6c2): undefined reference to `glEnableClientState@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x6cf): undefined reference to `glEnableClientState@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x6f6): undefined reference to `glVertexPointer@16'
obj\Release\Main.o:Main.cpp:(.text.startup+0x71f): undefined reference to `glTexCoordPointer@16'
obj\Release\Main.o:Main.cpp:(.text.startup+0x72e): undefined reference to `glDisableClientState@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x73b): undefined reference to `glDisableClientState@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0x7e8): undefined reference to `glViewport@16'
obj\Release\Main.o:Main.cpp:(.text.startup+0x990): undefined reference to `glClear@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0xa4d): undefined reference to `glMatrixMode@4'
obj\Release\Main.o:Main.cpp:(.text.startup+0xa53): undefined reference to `glLoadIdentity@0'
obj\Release\Main.o:Main.cpp:(.text.startup+0xa73): undefined reference to `glTranslatef@12'
obj\Release\Main.o:Main.cpp:(.text.startup+0xacf): undefined reference to `glRotatef@16'
obj\Release\Main.o:Main.cpp:(.text.startup+0xb20): undefined reference to `glRotatef@16'
obj\Release\Main.o:Main.cpp:(.text.startup+0xb6b): undefined reference to `glRotatef@16'
obj\Release\Main.o:Main.cpp:(.text.startup+0xb8a): undefined reference to `glDrawArrays@12'
obj\Release\Main.o:Main.cpp:(.text.startup+0xbf1): undefined reference to `glDeleteTextures@8'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
31 errors, 0 warnings (0 minutes, 2 seconds)
build messages:
obj\Release\Main.o:Main.cpp:(.text.startup+0x465)||undefined reference to `glGenTextures@8'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x47d)||undefined reference to `glBindTexture@8'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x4f4)||undefined reference to `gluBuild2DMipmaps@28'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x513)||undefined reference to `glTexParameteri@12'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x532)||undefined reference to `glTexParameteri@12'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x556)||undefined reference to `glEnable@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x563)||undefined reference to `glDepthMask@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x578)||undefined reference to `glClearDepth@8'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x586)||undefined reference to `glDisable@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x5cb)||undefined reference to `glViewport@16'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x5da)||undefined reference to `glMatrixMode@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x5e0)||undefined reference to `glLoadIdentity@0'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x674)||undefined reference to `glFrustum@48'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x683)||undefined reference to `glEnable@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x69a)||undefined reference to `glBindTexture@8'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x6c2)||undefined reference to `glEnableClientState@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x6cf)||undefined reference to `glEnableClientState@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x6f6)||undefined reference to `glVertexPointer@16'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x71f)||undefined reference to `glTexCoordPointer@16'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x72e)||undefined reference to `glDisableClientState@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x73b)||undefined reference to `glDisableClientState@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x7e8)||undefined reference to `glViewport@16'|
obj\Release\Main.o:Main.cpp:(.text.startup+0x990)||undefined reference to `glClear@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xa4d)||undefined reference to `glMatrixMode@4'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xa53)||undefined reference to `glLoadIdentity@0'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xa73)||undefined reference to `glTranslatef@12'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xacf)||undefined reference to `glRotatef@16'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xb20)||undefined reference to `glRotatef@16'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xb6b)||undefined reference to `glRotatef@16'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xb8a)||undefined reference to `glDrawArrays@12'|
obj\Release\Main.o:Main.cpp:(.text.startup+0xbf1)||undefined reference to `glDeleteTextures@8'|
||=== Build finished: 31 errors, 0 warnings (0 minutes, 2 seconds) ===|
certe c'est deja un gros mieux, mais c'est pas encore cela. si je comprend bien, ce genre de message survient lorsque le compilateur ne trouve pas la bonne lib, hors il n'y a pas de "sfml-opengl" a mettre dans les linkers, je me trompe? parce lorsque j'etait dans ce monde merveilleux ou la SFML fonctionnait ^^ j'avait tester tout les examples et a aucun moment je n'ai du rajouter de chose de ce genre.
je vais cesser de rajouter de la longueur a mon message, et je vais retourner tenter de faire fonctionner la chose sous ubuntu en attendant des reponses. en tout cas il y a du mieux, cela voudrait-il dire que la version 32 ou 64 bits ne concernerait pas le processeur du pc, mais plutot la version du compilateur? car etrangement je n'ai pas vu de minGW 64 bits...
merci encore de ta reponse G.