X-Recipient: archive-cygwin@delorie.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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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.3564@binki>	<20131214194009.GB3015@ednor.casa.cgf.cx>	<20131215140144.2768@binki>
Date: Sun, 15 Dec 2013 07:14:44 +0100
Message-ID: <CAB8Xom_ujQsXVbXQ5D6PtrNn9Zcg4fzieF4xPPLO_92aSfEXSA@mail.gmail.com>
Subject: Re: compiling and linking mechanics
From: marco atzeri <marco.atzeri@gmail.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.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, <wynfield gmail.com> 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


