g_print causes a segmentation fault



I compile the following code with : gcc -Wall -g test.c -o test
`gtk-config --cflags --libs`

#include <gtk/gtk.h>

int main(int argc, char *argv[])
{
    g_print("Hello world\n");

    return 0;
}


It compiles correctly, but when I run it, I get:
Segmentation fault (core dumped)

I can compile and execute things like the gtk helloworld example from
the tutorial, but
as soon as the program attemps a g_print it gives that error. I have
installed RedHat 6.0
on my system, and since then I have upraded KDE to 1.1.1. (taken from
the errata section
on their website) I have upgraded Gnome and glib with the RPMs from
their errata, and I have
installed KDevelop and gtk+. This is about all I have done to the
system.
The following is installed:
gtk+-1.2.3-2
gtk+-devel-1.2.3-2
gtk---1.0.2-1
gtk+10-1.0.6-5
gtk-engines-0.5-16
gtk---devel-1.0.2-1
libc-5.3.12-31

Does anybody have any advice on how to solve this problem?
Thanks




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