HP3000-L Archives

January 1997, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Date:
Sat, 18 Jan 1997 20:30:30 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
[log in to unmask] writes:
> I forgot... to compile and link in two steps i.e. gcc and ld
> you will have to add -c to the gcc command to tell it "compile
> to object code only, no linking to program desired". Otherwise
> the -o output file will be NMPRG (filecode 1030).

Whereas a one step build runs without unresolved externals but dies with the
invalid instruction problem, the following two step build works OK but the
run dies with an unresolved external of __main:

        gcc -D_SOCKET_SOURCE -o whois.o -c whois
        ld -L/usr/lib -lsocket -o whois whois.o

PS: If you can build and run ftp://rs.internic.net/netprog/whois.c on your
machine, I'd be interested in seeing the exact gcc/ld command syntax you
used.
--
Mark Bixby                      E-mail: [log in to unmask]
Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support               +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)

ATOM RSS1 RSS2