X-Spam-Check-By: sourceware.org Message-ID: <43C28AAA.F14517C6@dessent.net> Date: Mon, 09 Jan 2006 08:09:14 -0800 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg References: <36bf289b0601090721s5655b31fsa1c85dc192872b0d AT mail DOT gmail DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list 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. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/