Run into the strangest linking error for tools/trimscores on osx/darwin.

Compile of trimscores.c to .o no problems.

Go to link.

/usr/bin/gcc  -g -Wl,-search_paths_first -headerpad_max_install_names - 
fPIC trimscores.o  -o trimscores  ../ntserv/libnetrek.a
Undefined symbols:
   "_Cambot_out", referenced from:
       _Cambot_out$non_lazy_ptr in libnetrek.a(getpath.o)
   "_NoCount_File", referenced from:
       _NoCount_File$non_lazy_ptr in libnetrek.a(getpath.o)
   "_Global", referenced from:
       _Global$non_lazy_ptr in libnetrek.a(getpath.o)
   "_PlayerFile", referenced from:
       _PlayerFile$non_lazy_ptr in trimscores.o
       _PlayerFile$non_lazy_ptr in libnetrek.a(getpath.o)
   "_GodLog", referenced from:
       _GodLog$non_lazy_ptr in libnetrek.a(getpath.o)
<snip>

I've removed al CFLAGS and LDFLAGS still get the same linking error.

Ok, lets look at libnetrek, getpath.o in there?

$ ar t libnetrek.a | grep getpath
getpath.o

getpath cannot resolve (as an example) GodLog, poking around I found  
GodLog is defined in data.c

#ifdef CHECKMESG
char MesgLog[FNAMESIZE];
char GodLog[FNAMESIZE]; <----------
#endif

Is data.o in libnetrek?

$ ar t libnetrek.a | grep data
data.o

Is GodLog inside data.o?

$ ar x libnetrek.a  data.o
$ nm data.o  | grep GodLog
00000100 C _GodLog

Any ideas?

--
Bob Tanner <tanner at real-time.com>                 | Phone : 952-943-8700
http://www.real-time.com, Linux, OSX, VMware | Fax      : 952-943-8500
Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20090605/b1f887ad/attachment.pgp