Hello everyone.
I have an error in my makefile. When i execute it on the terminal in linux, it gives me the following errors
mkab@mkab-ThinkPad-SL400:~/Desktop/TP 5/src$ make test
gcc -c prog2.c
gcc *.o -o test
prog2.o: In function `tester_supprimer':
prog2.c:(.text+0x1c): undefined reference to `ajouter'
prog2.c:(.text+0x32): undefined reference to `ajouter'
prog2.c:(.text+0x48): undefined reference to `ajouter'
prog2.c:(.text+0x5e): undefined reference to `ajouter'
prog2.c:(.text+0x6c): undefined reference to `afficher'
prog2.c:(.text+0x77): undefined reference to `supprimer'
prog2.c:(.text+0x85): undefined reference to `afficher'
collect2: ld returned 1 exit status
make: *** [test] Error 1
This is my makefile
liste.o: liste.h liste.c
gcc -c liste.c
outils_liste.o: liste.h outils_liste.h outils_liste.c
gcc -c outils_liste.c
prog0.o: liste.h constantes.h prog0.h prog0.c
gcc -c prog0.c
prog1.o: liste.h prog1.h constantes.h prog1.c
gcc -c prog1.c
prog2.o: liste.h outils_liste.h constantes.h prog2.c
gcc -c prog2.c
test: prog2.o
gcc *.o -o test
clean:
rm -v *.o
It's like it cannot detect the functions in the defined in the ".h" files even though i listed them in the dependencies of prog2.o.
Thanks in advance