This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compiling and linking mechanics


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]