X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; q=dns; s=default; b=elYrCOzrWXtKVuNZ ZeUlw/6d6oezKCHqC1KIqasevQCxn6fhHKH+r6UophUKRdqdGQKi33ec4ZUrureZ VbSmt3P+QY3EuC3OhOuS56yfIhU1eRPvdmlrrrepbqTvvbWBIqZTb7b1g+BIoHiM KKLHnNUg3oVxY4Y0ZDD7Ozdd4Bc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; s=default; bh=dtCi80Viu8IFiqALiH1L/s JUw6A=; b=tedRDTENcvwA8e4yLyLb9a8WTMW7G8j+nwlk+AMkkN7s3+VUgiJdbh 7hZ6JrNfLS64XtarUbHoYEZz7r7A37QnLDtTi3aHD3kgBXQW9FLXUnv57AISqjqC X8bwFF2dkmbxPZFgDxN8g+QMCr/5UhKrFzdpES7wwP0pn3b/ZXquo= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vb0-f49.google.com MIME-Version: 1.0 X-Received: by 10.58.37.67 with SMTP id w3mr5626003vej.22.1387088084956; Sat, 14 Dec 2013 22:14:44 -0800 (PST) In-Reply-To: <20131215140144.2768@binki> References: <20131214235105 DOT 3564 AT binki> <20131214194009 DOT GB3015 AT ednor DOT casa DOT cgf DOT cx> <20131215140144 DOT 2768 AT binki> Date: Sun, 15 Dec 2013 07:14:44 +0100 Message-ID: Subject: Re: compiling and linking mechanics From: marco atzeri To: "cygwin AT cygwin DOT com" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id rBF6F3Dn001668 On Sun, Dec 15, 2013 at 6:01 AM, wrote: > > > Christopher Faylor wrote: > >> .... > > > > It isn't incredibly difficult to understand: Some poorly written makefiles > > put a -lib before the object files which rely on them. That works by > > coincidence in Linux but doesn't work on Windows. So put the -libraries > > last. > > -- > > What is the basis for the assertion that placing -lib before object files is an undesirable thing to do? Knowing why would be educational for all who don't know or think otherwise. For example placing definitions prior use prevents undefined forward reference problems. I am not commenting on possible efficiencies or either technique. Whether by design or fortune, Linux allows developers a less restrictive ordering. I suppose that the ordering is due for the lack of functionality in the linker that Cygwin uses. > > Cheers > CGF wrote "on Windows" it is not a cygwin specific issue, and also other platforms other than Windows work in the same way. For a nice explanation http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple