From owner-freebsd-questions Thu Dec 17 17:11:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA17364 for freebsd-questions-outgoing; Thu, 17 Dec 1998 17:11:31 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from www.transfar.com ([202.103.100.88]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA17353 for ; Thu, 17 Dec 1998 17:11:29 -0800 (PST) (envelope-from phj@www.transfar.com) Received: from www.transfar.com ([202.103.100.243]) by www.transfar.com (Netscape Mail Server v2.02) with ESMTP id AAA5498 for ; Fri, 18 Dec 1998 09:10:24 +0800 Message-ID: <367A1D70.776909F1@www.transfar.com> Date: Fri, 18 Dec 1998 09:16:32 +0000 From: Peng HaiJie X-Mailer: Mozilla 4.07 [en] (X11; I; FreeBSD 2.2.8-RELEASE i386) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: How to build static excutable program? Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It the first time that I make a static excutable program. I have tried the following lines: gcc -static -o foo foo.c but gcc tells that there are some undefined references . What is the matter? How to build static excutable program?Please give me an example thanks in advace. P.H.J. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message