Mail Archives: djgpp/1996/06/10/17:34:44
On Sat, 8 Jun 1996 21:36:55 +0100, Shawn Hargreaves
<slh100 AT york DOT ac DOT uk> 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.
- Raw text -