From: George Foot Newsgroups: comp.os.msdos.djgpp Subject: Re: making .cc files Date: 2 Feb 1998 09:27:24 GMT Organization: Oxford University, England Lines: 34 Message-ID: <6b43hs$pu0$2@news.ox.ac.uk> References: <34D4EDC7 DOT D2D24204 AT physics DOT ubc DOT ca> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Sun, 01 Feb 1998 13:48:55 -0800 in comp.os.msdos.djgpp Rik Blok wrote: : # executables : ccprog: ccprog.o common.o : justc: justc.o common.o : # object files : ccprog.o: ccprog.cc ccprog.h common.h : justc.o: justc.c justc.h common.h : common.o: common.c common.h The trouble is, as far as Make is concerned the relationship between ccprog.o and ccprog is just the same as that between justc.o and justc. There's no (neat) way of making it figure out the difference between the two. However, it doesn't matter if the C++ libraries are also offered for linking into the C program, so you could just set one of the standard variables like this (to link in a few specific libraries): LDLIBS = -lstdcxx -lgpp #... or like this to use gxx instead of gcc all through: CC = gxx Put one or both of these at the top of your makefile, and the implicit rules will use these values instead of the defaults. -- george DOT foot AT merton DOT oxford DOT ac DOT uk Remember what happened to the dinosaurs.