Hi,
I must have a misunderstanding of how make works. Here is a simple program
to illustrate my problem.
I have a file called a.cpp and a makefile that looks like this:
CC = g++
all :
ar -r mylib a.o
If I type make all, I would expect make to not find any file called a.o, but
notice that there is a file called a.cpp and would then use the built in
suffix rules to build a.o from a.cpp. However, make returns an error for
not being able to find a.o.
If I first issue the command g++ -c a.cpp which builds a.o and then do make
all, mylib is built with no problem.
I must have some misunderstanding of this. Why does a.o not get built by
the implicit rules of make?
Any help in clearing up my misunderstanding, even flaming would be very much
appreciated.
Thanks
Ed Doyle