g_object_new() and g++
- From: Adrian Immler <a immler 12mm de>
- To: gtk-app-devel-list gnome org
- Subject: g_object_new() and g++
- Date: Sat, 25 Jan 2003 18:43:28 +0100
hi all !
i am having problems compiling the very reduced code snipped below.
my build command is:
g++ -Wall -g test.c -o test `pkg-config --clags gtk+-2.0` \
`pkg-config --libs gtk+-2.0`
it ends up with:
"cannot convert `void*` to `GtkTreeView*` in assignment"
when i replace the "g++" through "gcc" it works. but i need to use g++.
any idea ?
thanks in advance
======================
#include <gtk/gtk.h>
#include <glib.h>
int main( gint argc, gchar *argv[] ){
gtk_init (&argc, &argv);
GtkListStore *liste;
GtkTreeView *ansicht;
liste = gtk_list_store_new(3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING);
ansicht = g_object_new(GTK_TYPE_TREE_VIEW,
"model", liste,
"rules-hint", TRUE,
"headers-clickable", FALSE,
"reorderable", FALSE,
"enable-search", TRUE,
"search-column", 1,
NULL);
gtk_main ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]