From owner-freebsd-hackers Sat Apr 11 13:32:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA02161 for freebsd-hackers-outgoing; Sat, 11 Apr 1998 13:32:03 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA02137 for ; Sat, 11 Apr 1998 13:31:54 -0700 (PDT) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id OAA11961; Sat, 11 Apr 1998 14:31:54 -0600 (MDT) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id OAA24107; Sat, 11 Apr 1998 14:31:51 -0600 Date: Sat, 11 Apr 1998 14:31:51 -0600 Message-Id: <199804112031.OAA24107@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Fred Gilham Cc: hackers@FreeBSD.ORG Subject: Re: Pesky ld Problem In-Reply-To: <199804111701.KAA07030@snapdragon.csl.sri.com> References: <199804111701.KAA07030@snapdragon.csl.sri.com> X-Mailer: VM 6.29 under 19.15 XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > cc -static -o outputfile objectfiles.o objectfiles.lo -libraryfiles .. > > ld: No reference to __DYNAMIC .. > I've seen this happen when you try to link a shared (pic) object into > a static binary. Make sure all your object files and libraries are > static (compiled without the -fpic or -fPIC option to GCC), or link > dynamically. Actually, how they were compiled is irrelevant (although if you plan on making them static they'll be slower if compiled -fPIC), but it has to do with how they are 'bundled' at link time. Shlibs are bundled differently than plain .o files, and *require* that they be linked shared. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message