From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,e39547583c00dea8,start X-Google-Attributes: gid1164f8,public From: John Doe Subject: debugging user libraries Date: 1997/04/28 Message-ID: <33648ECA.3ABA320E@no.spam.com>#1/1 X-Deja-AN: 237922928 Organization: Poor Newsgroups: comp.sys.dec Hardware is AlphaStation 600, OS is DEC Unix 3.2C, compiler DEC C compiler, loader DEC ld version 3.11 I compile a bunch of C files and stuff them into an archive, like so: cc -O5 foo1.c cc -O5 foo2.c cc -O5 foo3.c ar csr libfoo.a foo1.o foo2.o foo3.o Then I compile another program, like so: cc -O5 bar1.c bar2.c bar3.c -L. -lfoo No problem. But the new program doesn't work, so I want to debug it. I recompile: cc -g bar1.c bar2.c bar3.c -L. -lfoo but, alas, ld now complains at linking time: ld: Unresolved: _OtsMove _OtsDivide64Unsigned If I do ``nm libfoo.a'' I find these names. Is there a simple way to get the compiler and loader to let me debug the program that doesn't work? I know the problems aren't in libfoo.a, and I'm willing to not be able to use the debugger there, just like I can't use it for math library calls. . . I suppose I can recompile the library routines with the -g flag, but surely there's a better solution. Any help appreciated. Christopher Grayce UCI Department of Chemistry cgrayce@uci.edu * email header is anti-spam - to write directly use email in sig *