delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/10/16:15:19

From: ams AT ludd DOT luth DOT se (Martin Str|mberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Implicit make rules fail to link with std C++ library
Date: 10 Jul 1999 11:42:45 GMT
Organization: University of Lulea, Sweden
Lines: 30
Message-ID: <7m7bjl$ei9$1@news.luth.se>
References: <37897534 DOT 8132755 AT news DOT clara DOT net>
NNTP-Posting-Host: queeg.ludd.luth.se
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019