Utilisation d'un makefile

adeline11 Messages postés 58 Statut Membre -  
 SylvetteTech -
Bonjour,
Je voudrais utiliser un makefile mais j'utilise la SDL dans mon programme. Je ne sais pas du tout comment faire.

Mon makefile:

CC=g++ -I/usr/include/SDL -L/usr/lib


LDFLAGS = `sdl-config --cflags --libs` -lSDLmain -lSDL -lSDL_image -lSDL_ttf

OBJETS= Fonctions.o Main.o



TARGET= Pong



$(TARGET) : $(OBJETS)

$(CC) $(OBJETS) -o $(TARGET)
$(CXX) $^ -o $@ $(LDFLAGS)



Tableau.o : Fonctions.cc Fonctions.h

$(CC) -c Fonctions.cc



Main.o : Main.cc Fonctions.h

$(CC) -c Main.cc



clean :

rm -f *~ *.o $(TARGET)

# DO NOT DELETE


L'erreur affichée dans le terminal:
Fonctions.cc: In function «SDL_Surface* loadImage(std::string)»:
Fonctions.cc:29: erreur: «IMG_Load» was not declared in this scope
Fonctions.cc: In function «SDL_Surface* loadImageWithColorKey(std::string, int, int, int)»:
Fonctions.cc:38: erreur: «IMG_Load» was not declared in this scope
make: *** [Fonctions.o] Erreur 1


merci d'avance pour votre aide!!

1 réponse

SylvetteTech
 
MWARF MWARF MWARF MWARF Vive l'iut Bdx 1.
0