Subject: Bulding my own static libraries?
To: None <port-mac68k@netbsd.org>
From: Alexander Klein <Alexander.Klein@math.uni-giessen.de>
List: port-mac68k
Date: 03/30/2002 10:42:27
Hi,

I know this is maybe the wrong place for this question, but I've looked in
all the standard places and found no satisfactory answer to my question:

Does anyone know how I have to build static libraries for use with gcc?

According to all the descriptions I found, it should be sufficient to:

gcc -c -m68040 stuff.c
ar rsv libstuff.a stuff.o

and then tell gcc where to find libstuff.a with -L along with a '-lstuff'
option.

In fact, it works to this point, libstuff.a is found by gcc, nm -s
libstuff.a shows that all the objects are in the table of contents, but the
linker (ld) always dies with something like 'Undefined object _blabla
referenced from text segment', although nm lists _blabla as a name in
libstuff.a

What could I do wrong?

Best regards, and happy easter to all!

	Alex