On Wed, 14 Jul 2004 13:29:08 -0700, xuatla <xu****@gmail.com> wrote:
Is it off-topic here or not? If not, please help me. Thanks in advance.
It's off topic, but see below.
X
--------------------
I have main.cpp, tfunclib.cpp in the current folder (same as makefile),
and "library files" vmclass.cpp, tclass.cpp, newtonsolver.cpp in another
folder (mentioned below as OBJDIR). i compile those "library files" and
it's ok.
now i want to make main.cpp in the current folder. how can i specify the
director to the makefile so that it knows where i put the library files?
I got the following msg for output:
--------------------
make: *** No rule to make target `tclass.cpp', needed by `tclass.o'.
Stop.
--------------------
and my source code of makefile below:
--------------------
TARGET = main
OBJDIR = /home1/user/personal/program/cpplibrary/standard
OBJ = main.o tfunclib.o tclass.o vmclass.o newtonsolver.o
I could easily be wrong but the obvious thing to me would be to replace
OBJ = main.o tfunclib.o tclass.o vmclass.o newtonsolver.o
with
OBJ = main.o tfunclib.o $(OBJDIR)/tclass.o $(OBJDIR)/vmclass.o
$(OBJDIR)/newtonsolver.o
but that's just a guess.
If that doesn't help try a group with linux and development in its name,
e.g. news:comp.os.linux.development.apps They should know about gnu make.
john