From owner-freebsd-questions Mon Nov 11 22:11:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 575B137B404 for ; Mon, 11 Nov 2002 22:11:33 -0800 (PST) Received: from smtpa.ha-net.ptd.net (smtpa.ha-net.ptd.net [207.44.96.81]) by mx1.FreeBSD.org (Postfix) with SMTP id 4448A43E77 for ; Mon, 11 Nov 2002 22:11:32 -0800 (PST) (envelope-from tms2@mail.ptd.net) Received: (qmail 24140 invoked by uid 50005); 12 Nov 2002 06:11:21 -0000 Received: from tms2@mail.ptd.net by smtpa.ha-net.ptd.net by uid 50002 with qmail-scanner-1.14 (uvscan: v4.1.60/v4232. spamassassin: 2.31. Clear:. Processed in 0.768015 secs); 12 Nov 2002 06:11:21 -0000 Received: from du104.cli.ptd.net (HELO mail.ptd.net) ([204.186.33.104]) (envelope-sender ) by smtpa.ha-net.ptd.net (qmail-ldap-1.03) with SMTP for ; 12 Nov 2002 06:11:20 -0000 Message-ID: <3DD09B89.F1247399@mail.ptd.net> Date: Tue, 12 Nov 2002 01:11:21 -0500 From: "T.M. Sommers" Organization: None X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-chat@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Unresolved reference compiling Objective-C ?? References: <20021108173235.GA82490@dogma.freebsd-uk.eu.org> <20021111234035.GA17831@dogma.freebsd-uk.eu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jonathon McKitrick wrote: > > On Sun, Nov 10, 2002 at 03:41:38PM +0100, Dag-Erling Smorgrav wrote: > | In other words: always specify libraries at the end of the compiler or > | linker command line. > > So why allow putting them at the beginning, where mistakes like this can > happen? Is that ever useful? Would it be wrong to 'assume' all libraries > be linked after all object files? Yes. At least in C and C++, the startup library (which calls main()), at least, must go first. Normally the compiler does this automatically, but you might want to do it yourself. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message