Xref: news2.mv.net comp.os.msdos.djgpp:4811 From: baren AT ix DOT netcom DOT com (The Great and Powerful Marcus) Newsgroups: comp.os.msdos.djgpp Subject: Re: dumb newbie question: make and allegro library... Date: Sat, 08 Jun 1996 21:41:21 GMT Organization: Netcom Lines: 29 Message-ID: <31b9f2fd.25246081@nntp.ix.netcom.com> References: NNTP-Posting-Host: war-mi4-09.ix.netcom.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Sat, 8 Jun 1996 21:36:55 +0100, Shawn Hargreaves wrote: >References to libraries have to come after the source file they are >using. This is because ld is a single-pass linker, so it looks first at >the libraries but ignores them because it doesn't have any unresolved >symbols. Then it comes to the colors.o file which uses lots of symbols, >but by this time it is too late to go back and get them from the library :-) > >Try something like: > >CFLAGS = -O -Wall etc. >LIBS = ../lib/liballeg.a -liostream > >dots : colors.cpp > gcc $(CFLAGS) colors.cpp $(LIBS) > Thank you very much, Shawn, that did the trick! However, having make work has brought up a secondary problem. It is deleting my source files. Haha, silly me, no back up... The Great and Powerful Marcus -- baren AT ix DOT netcom DOT com ------------------------------------------------------------------------------ "The area of a circle equals the area of a square whose side is 1/4 the circumference of the circle. Working this out algebraically, we see that pi must be equal to 4." Indiana Legislature, House Bill #246, 1897, passed 67-0, tabled in the Senate.