compiling and linking mechanics

marco atzeri
Sun Dec 15 06:14:00 GMT 2013

On Sun, Dec 15, 2013 at 6:01 AM, <wynfield> 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

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list