This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: compiling and linking mechanics
- From: wynfield at gmail dot com
- To: <cygwin at cygwin dot com>
- Date: Sun, 15 Dec 2013 18:37:54 +0900
- Subject: Re: compiling and linking mechanics
- Authentication-results: sourceware.org; auth=none
- References: <20131214235105 dot 3564 at binki> <20131214194009 dot GB3015 at ednor dot casa dot cgf dot cx> <20131215140144 dot 2768 at binki> <CAB8Xom_ujQsXVbXQ5D6PtrNn9Zcg4fzieF4xPPLO_92aSfEXSA at mail dot gmail dot com>
That's good to know. Thank you and Christopher for the information
marco atzeri wrote:
> 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
>
--
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