Newbie Question: How i can use glib-2.0 in my c-programm ?



Hi!

As i search the web for a util-library that i can use in my c-programms,
i found glib-2.0. So i decide to install it on my system (debian 4.0 -
libglib-2.0 and libglib-2.0-dev). When i try to use it, i did'nt work.
The Source (a simple test):

-- Snip
#include <stdio.h>

#include <glib-2.0/glib.h>

void main(int argc, char *argv) {
    gstring *gs = NULL;
}

-- Snip

db03:/home/ks/src/test/Release# gcc -o test test.c -I
/usr/include/glib-2.0/ -I /usr/lib/glib-2.0/include/
test.c: In function `main':
test.c:6: Fehler: »gstring« nicht deklariert (erste Benutzung in dieser
Funktion)
test.c:6: Fehler: (Jeder nicht deklarierte Bezeichner wird nur einmal
aufgeführt
test.c:6: Fehler: für jede Funktion in der er auftritt.)
test.c:6: Fehler: »gs« nicht deklariert (erste Benutzung in dieser Funktion)
test.c:5: Warnung: Rückgabetyp von »main« ist nicht »int«

-- Snip

Sorry, german text. It say's:
    test.c:6: Error: »gstring« not declared

Hmmm :)

Thanks for your help.

CU,
   Kai.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]