Bonjour à tous, voilà j'ai écris un programme comportant 3 fichiers qui sont : Labyrinthe.cpp Joueur.cpp Joueur.h ( utilisant openGL et glut ). Pour la compilation je voudrais faire un makefile, pour l'instant j'ai écris:
Le problème est que quand je saisis make dans le terminal j'obtiens :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Labyrinthe : Labyrinthe.o Joueur.o g++ -o Labyrinthe Labyrinthe.o Joueur.o Joueur.o : Joueur.cpp Joueur.h g++ -lglut -lGLU -lGL -o Joueur.o -c Joueur.cpp Joueur.h Labyrinthe.o : Labyrinthe.cpp Joueur.h g++ -lglut -lGLU -lGL -o Labyrinthe.o -c Labyrinthe.cpp Joueur.h
Je ne comprends pas pourquoi je n'arrive pas à obtenir mon binaireg++ -lglut -lGLU -lGL -o Labyrinthe.o -c Labyrinthe.cpp Joueur.h
Labyrinthe.cpp: In function ‘int main(int, char**)’:
Labyrinthe.cpp:21:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
OuvrirNiveau("niveau.txt");
^
g++ -lglut -lGLU -lGL -o Joueur.o -c Joueur.cpp Joueur.h
g++ -o Labyrinthe Labyrinthe.o Joueur.o
Labyrinthe.o: file not recognized: Format de fichier non reconnu
collect2: error: ld returned 1 exit status
make: *** [Labyrinthe] Erreur 1...Auriez-vous une idée sur l'origine du problème? En vous remerciant par avance.
Partager