X-Spam-Check-By: sourceware.org Message-ID: <467155CA.51269500@dessent.net> Date: Thu, 14 Jun 2007 07:50:50 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: gcc with glib References: 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-Id: 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 PRIEUR Christophe RD-TECH-ISS wrote: > Here is my command line: > gcc -I"/usr/include/glib-2.0" -l glib-2.0 TestGLib.c The order of arguments of your command is wrong. The linker works from left to right, resolving undefined references as it goes. If it sees a library specified before any objects using symbols from that library, it won't include anything from the library. 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/