From owner-freebsd-hackers Sun Oct 5 00:39:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA04832 for hackers-outgoing; Sun, 5 Oct 1997 00:39:02 -0700 (PDT) Received: from thelab.hub.org (ppp-146.halifax-01.ican.net [206.231.248.146]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA04827 for ; Sun, 5 Oct 1997 00:38:54 -0700 (PDT) Received: from thelab.hub.org (localhost [127.0.0.1]) by thelab.hub.org (8.8.7/8.8.2) with SMTP id EAA04043 for ; Sun, 5 Oct 1997 04:38:48 -0300 (ADT) Date: Sun, 5 Oct 1997 04:38:48 -0300 (ADT) From: The Hermit Hacker To: hackers@freeBSD.org Subject: static vs dynamic compiling... Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freeBSD.org X-Loop: FreeBSD.org Precedence: bulk Hi... 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 If I do a simple program (hello world) this does work... I realize that this is probably a really simple question, but I generally just compile using the 'default' of 'dynamic' and not worry about it, but I'm trying to make a static binary that I can run on another FreeBSD system, of a different release :( Thanks for any help, in advance... Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org