Hello there,
I've been searching to see if I can find an issue to this problem but so far I haven't found anything that really helps.
I was making changes to one of the .h files of my project, nothing big simply commenting some unnecessary lines. When I tried running the makefile again, it updated all modules except for that one (security.h). I went ahead and added a 'clean' in efforts to force the makefile to make everything again.
Since then I've been getting the following error:
Code:
[Kalico@Kalico Modular_Prog]$ make
gcc -c main.c
gcc -c user.c
gcc -c menu.c
gcc -c security.h
gcc -o main main.o user.o menu.o security.o
gcc: error: security.o: No such file or directory
make: *** [main] Error 1
[Kalico@Kalico Modular_Prog]$
As the error says, security.o isn't created. In it's place I have security.gch.
I'm not certain why exactly it's causing this error, the first time I ran the makefile it compiled everything perfectly and I didn't change any lines, simply added the clean command.
Code:
# Makefile for the main application
main: main.o user.o menu.o security.o
gcc -o main main.o user.o menu.o security.o
main.o: main.c user.h menu.h security.h
gcc -c main.c
user.o: user.c user.h
gcc -c user.c
menu.o: menu.c menu.h
gcc -c menu.c
security.o: security.c security.h
gcc -c security.h
clean:
\rm *.o
"makefile" 19L, 325C
Any insight is appreciated. Thanks!