From owner-freebsd-questions Wed May 3 6:13:15 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cx344940-a.meta1.la.home.com (cx344940-a.meta1.la.home.com [24.6.21.74]) by hub.freebsd.org (Postfix) with ESMTP id 3773437BC0B for ; Wed, 3 May 2000 06:13:01 -0700 (PDT) (envelope-from conrads@cx344940-a.meta1.la.home.com) Received: (from conrads@localhost) by cx344940-a.meta1.la.home.com (8.9.3/8.9.3) id IAA34535 for questions@freebsd.org; Wed, 3 May 2000 08:12:59 -0500 (CDT) (envelope-from conrads) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 03 May 2000 08:12:59 -0500 (CDT) Organization: @Home Network From: Conrad Sabatier To: questions@freebsd.org Subject: "No reference to __DYNAMIC" when linking aout binaries Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Recently, while in the process of doing a port of XSwallow, I ran into some problems linking the final shared library (xswallow.so) in aout format. The strategy used in the dist Makefile for FreeBSD is to compile the two files that make up the final binary separately, producing two *.o files, which are then linked together in the final step. When I tried doing this, I kept getting a "No reference to __DYNAMIC" error from the linker. Even adding includes for link.h, etc. to the source did no good. I finally gave up and just did a straight one-step compile, which worked fine. But I'm still wondering what was causing this error, and how to fix it. I was compiling the two intermediate obj's with "-aout -shared -nostdlib", and then linking with "-aout -shared -nostdlib -L/usr/lib/compat/aout -lgcc". Actually, I tried tons of variations on these, including adding "-nostartfiles", all to no avail. What was I missing here? -- Conrad Sabatier http://members.home.net/conrads/ ICQ# 1147270 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message