From owner-freebsd-hackers Sun Oct 5 04:51:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA14377 for hackers-outgoing; Sun, 5 Oct 1997 04:51:06 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id EAA14371 for ; Sun, 5 Oct 1997 04:51:00 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id NAA02226; Sun, 5 Oct 1997 13:50:58 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id NAA29866; Sun, 5 Oct 1997 13:42:14 +0200 (MET DST) Message-ID: <19971005134214.NH30632@uriah.heep.sax.de> Date: Sun, 5 Oct 1997 13:42:14 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: hackers@FreeBSD.ORG Cc: scrappy@hub.org (The Hermit Hacker) Subject: Re: static vs dynamic compiling... References: X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from The Hermit Hacker on Oct 5, 1997 04:38:48 -0300 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As The Hermit Hacker wrote: > I'm curious as to why I get the following error when attempting > to compile using -static: > > gcc -static pg_dump.o common.o -o pg_dump -L../../interfaces/libpq -lpq \ > -L/usr/local/lib -lcrypt -lcompat -lln -lm -lreadline -ltermcap \ > -lcurses > ld: No reference to __DYNAMIC > gmake: *** [pg_dump] Error 1 Because dlopen(3) & friends are only available on dynamically linked binaries (in our a.out, as i understand it). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)