This is the mail archive of the
mailing list for the Cygwin project.
Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 09 Jan 2006 08:09:14 -0800
- Subject: Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg
- References: <firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
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: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html