delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/06/15/08:44:42

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: gcc with glib
Date: Fri, 15 Jun 2007 14:44:07 +0200
Message-ID: <BAF83494CE653943A97B9F755016A0660513602F@ftrdmel1.rd.francetelecom.fr>
In-Reply-To: <467155CA.51269500@dessent.net>
References: <467155CA DOT 51269500 AT dessent DOT net>
From: "PRIEUR Christophe RD-TECH-ISS" <christophe DOT prieur AT orange-ftgroup DOT com>
To: <cygwin AT cygwin DOT com>
Reply-To: <prieur AT liafa DOT jussieu DOT fr>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l5FCiVIx014765

> From: Brian Dessent [mailto:brian AT dessent DOT net] 
>
> > 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.

Okay!  You're right, it works.  I guess some versions of gcc are a bit
more open-minded on this issue (trying to save my self-esteem of old C
programmer).

> From: Yaakov (Cygwin Ports) [mailto:yselkowitz AT users DOT sourceforge DOT net] 
>
> gcc -o TestGLib.o TestGLib.c `pkg-config --cflags --libs glib-2.0`
> 
> (And for your own sake, don't move around files; everything has it's
> place, and for good reason.)

Yeah, i had tried with this pkg-config thing, but still with the bad
order.
As for moving things around, you know, sometimes you're desperate :o)

Thank you both,

--	Christophe.
prieur AT liafa DOT jussieu DOT fr

--
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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019