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: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg

Vijay Kiran Kamuju wrote:

> They are currently a part of the cygwin net release.
> Please check the line no 2301 in the setup.ini

You're right, I overlooked that.

> But i cannot compile the program, even though i have installed them.
> I dont know how other programs that use esound like the Gnome libs,
> etc emmbed in them.
> They all seem to compile fine :( like the enlightenment

As others have said the reason is that you have the link order wrong. 
The way ld works is to scan arguments from left to right, and include
the necessary modules from each library that have been referenced from
previously seen objects.  This means you generally need to specify
libraries after object files, otherwise when the linker examines the
library there will be no unresolved symbols yet encountered, so it will
include nothing from the library.

I think that the reason most people don't notice this on linux is that
it can do lazy linking, where the symbols are resolved at runtime.  But
windows requires all unknown symbols to be resolved at link-time, so you
can't get away with being sloppy with the link order.


Unsubscribe info:
Problem reports:

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