-
MakeFile example
I am trying to set up a makefile for use with GNU make for the first time:
My program has the following files:
myprog.cpp
myprog.h
Then I want to make an object file and include it from these files:
test.cpp
test.h
Here is my makefile:
Code:
myprog : myprog.o test.o
myprog.o: myprog.cpp myprog.h
test.o: test.cpp test.h
Is this correct?
-
When I run make.exe, it says this:
Code:
C:\Project>make
cc myprog.o -o myprog
process_begin: CreateProcess(NULL, cc myprog.o -o myprog, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [myprog] Error 2