Path: news.daimi.aau.dk!not-for-mail From: Peter Andersen Newsgroups: comp.lang.beta Subject: Re: betaoption -d Date: Mon, 7 Apr 1997 09:37:20 +0200 (MET DST) Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 59 Approved: mailtonews@daimi.aau.dk Distribution: world Message-ID: <199704070737.JAA26180@mjolner.mjolner.dk> Reply-To: Peter Andersen NNTP-Posting-Host: daimi.daimi.aau.dk Xref: news.daimi.aau.dk comp.lang.beta:11026 Claus-Peter Knaut writes: > > Hello, > > when i compile my program with the -d option i get the following error > from the linker: > > Building dependency graph for: 'main' ... > Translating fragments ... > Linking > Undefined first referenced > symbol in file > socket /app/sun4_55/unido-inf/beta/4.0/process/current/private/sun4s/nonblock.o > gethostbyname /app/sun4_55/unido-inf/beta/4.0/unixlib/v1.5/private/sun4s/unixInt.o > accept /app/sun4_55/unido-inf/beta/4.0/process/current/private/sun4s/nonblock.o > bind /app/sun4_55/unido-inf/beta/4.0/process/current/private/sun4s/nonblock.o > shutdown /app/sun4_55/unido-inf/beta/4.0/process/current/private/sun4s/communication_unixbody.o > getsockname /app/sun4_55/unido-inf/beta/4.0/process/current/private/sun4s/nonblock.o > listen /app/sun4_55/unido-inf/beta/4.0/process/current/private/sun4s/nonblock.o > connect /app/sun4_55/unido-inf/beta/4.0/unixlib/v1.5/private/sun4s/unixInt.o > ld: fatal: Symbol referencing errors. No output written to main > > > without -d it does the followinf: > > beta -w main > Mjolner BETA System version 5.2(2) for SUN-4 Solaris 2.x (ELF) > Target machine type sun4s > Building dependency graph for: 'main' ... > Translating fragments ... > Linking > Object program on file: main > > > Why is the debugcode needed ? > This is not because the debug code is needed, but because the link directive generated by the compiler is wrong when using -d: The libraries '-lsocket -lnsl' are missing before '-lm -lc'. This error was fixed in release 4.0.1 of the Mjolner BETA System. You can work around the error by compiling with -p (preserves job file), add '-lsocket -lnsl' before '-lm' in sun4s/main..job, and then execute sun4s/main..job. Sincerely, Peter Andersen, Mjolner Informatics