Mail Archives: djgpp/1999/07/10/16:15:19
George Ryot (ryot AT bigfoot DOT com) wrote:
: I'm trying to set up a simple makefile to build C++ programs.
[Klippa, klapp, kluppit compile error messages and test program.]
: # ---- makefile ----
: TARGETS = hello
: CFLAGS = -O -Wall -Werror
:
: all: $(TARGETS)
:
: clean:
: @for %x in ($(TARGETS)) do rm -f %x %x.o %x.exe
:
:
: Adding the line "CXX = gxx" solves the linking problem, and changing
: CFLAGS to CPPFLAGS solves the other but neither of these seem to me to
: be the best answer. Building C++ programs with make should be as
: straight forward as with C programs, did I miss something in the FAQ
: or could my installation be at fault. Any debugging of the files
: above or pointers to documentation gratefully received.
CPPFLAGS is the preprocessor's flags. For C++ use CXXFLAGS.
If you still have a problem, use "make -pn" and analyse its output.
Skunk Anansie, Paranoid & Sunburnt,
MartinS
- Raw text -