Bonjour,
j'ai créé un makefile mais j'ai un probleme pour compiler un groupe de fichier.
Voici le makefile:Alors je vous explique, j'ai un programme principal main.cpp et j'ai un programme de traitement POV_SYSTEME.cpp qui lui utilise des fichiers .c.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 LDFLAGS= -lcv -lhighgui -lstdc++ -lueye_api -lcxcore -lcvaux SRC1 = $(wildcard src/*.cpp) OBJ1 = $(patsubst %.cpp, %.o, $(SRC1)) SRC2 = $(wildcard src/*.c) OBJ2 = $(patsubst %.c, %.o, $(SRC2)) all: Prog clean Prog: $(OBJ2) ${OBJ1} g++ -c $(OBJ2) ${OBJ1} -o src/Prog $(LDFLAGS) %.o : %.cpp gcc -c $< -o $@ $(LDFLAGS) %.o : %.c gcc -c $< -o $@ -W -Wall -ansi -pedantic clean: rm src/*.o
Il me dit cette erreur :
Et ensuite à quoi sert la formule -W -Wall -ansi -pedantic, je l'ai testé, ... mais je ne sais pas trop à quoi elle sert.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 gcc -c src/fast_10.c -o src/fast_10.o -W -Wall -ansi -pedantic gcc -c src/fast_11.c -o src/fast_11.o -W -Wall -ansi -pedantic gcc -c src/fast_12.c -o src/fast_12.o -W -Wall -ansi -pedantic gcc -c src/fast_9.c -o src/fast_9.o -W -Wall -ansi -pedantic gcc -c src/fast.c -o src/fast.o -W -Wall -ansi -pedantic gcc -c src/nonmax.c -o src/nonmax.o -W -Wall -ansi -pedantic gcc -c src/main.cpp -o src/main.o -lcv -lhighgui -lstdc++ -lueye_api -lcxcore -lcvaux src/main.cpp:54: warning: typedef was ignored in this declaration src/main.cpp: In function int main(int, char**): src/main.cpp:83: warning: format %d expects type int, but argument 2 has type double src/main.cpp: In function int InitDisplayMode(): src/main.cpp:230: warning: NULL used in arithmetic gcc -c src/POV_SYSTEME.cpp -o src/POV_SYSTEME.o -lcv -lhighgui -lstdc++ -lueye_api -lcxcore -lcvaux g++ -c src/fast_10.o src/fast_11.o src/fast_12.o src/fast_9.o src/fast.o src/nonmax.o src/main.o src/POV_SYSTEME.o -o src/Prog -lcv -lhighgui -lstdc++ -lueye_api -lcxcore -lcvaux g++: src/fast_10.o: linker input file unused because linking not done g++: src/fast_11.o: linker input file unused because linking not done g++: src/fast_12.o: linker input file unused because linking not done g++: src/fast_9.o: linker input file unused because linking not done g++: src/fast.o: linker input file unused because linking not done g++: src/nonmax.o: linker input file unused because linking not done g++: src/main.o: linker input file unused because linking not done g++: src/POV_SYSTEME.o: linker input file unused because linking not done rm src/*.o
Quelqu'un pourrait m'aider?
D'avance merci.
Partager