> > I also learned to use make. Here is my makefile. Where do I put the
> > -lncurses ?
> To the linker line, after $(objects) (order is important IIRC).
Definitely, libraries should always come at the end, otherwise
the linker may disregard functions defined in libraries that only
are only required by object files coming later.
> > tokenizec.cpp : tokenizec.h macros.h
These lines look a bit strange: the .cpp files don't "depend"
on the header files (i.e. they aren't to be generated anew
when one of the header files is changed). Instead you probably
meant here to have something like
tokenizec.o: tokenizec.cpp tokenizec.h macros.h
i.e. instruct make to rebuild tokenizec.o whenever any one of
tokenizec.cpp, tokenizec.h or macros.h was modified after the
.o was last built - what you have on te left side of the colon
is the "target", i.e. what make is supposed to produce, and
on the right side is the list of files the "target" is de-
pendent on (created from). Recompiling the .o file will then
force make to also relink the final executable due to the
changed .o file.
Without dpecifying how that's to be done make invokes the
default C++ compiler (for .cpp files) with your CXXFLAGS.
Regards, Jens
--
\ Jens Thoms Toerring ___
j...@toerring.de
\__________________________
http://toerring.de