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]

gcc with glib

Hi there,

I'm trying to compile some C program using glib 2.0 and i have some

Here is my command line:
gcc -I"/usr/include/glib-2.0" -l glib-2.0 TestGLib.c

First gcc told me it didn't find glibconfig.h, that happened to be in an
awkward directory, namely
Awkward because there was no other files in this directory and all glib
header files are in /usr/include/glib-2.0 (in particular glib/gtypes.h
that includes glibconfig.h)

So i've copied it to the proper directory (and don't ask me why it
wasn't there already).
First problem fixed.

Now my real problem is that gcc doesn't look able to manage link

undefined reference to `_g_int_equal'
undefined reference to `_g_int_hash'
undefined reference to `_g_hash_table_new'
collect2: ld returned 1 exit status

It didn't find the binary code for functions that were declared in
glib.h etc.
The file "/usr/lib/libglib-2.0.a" is there though.

My version of cygwin: CYGWIN_NT-5.1

Any clues?

--	Christophe.

Unsubscribe info:
Problem reports:

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