|
关于GtkItemFactoryEntry 结构的问题
static GtkItemFactoryEntry menu_items[] =
{
{"/ file (_F) ", NULL, NULL, 0, "<Branch>"},
{"/ file (_F) /new", NULL, on_menu_activate, "new", "<StockItem>", GTK_STOCK_NEW},
{"/ file (_F) /open", NULL, on_menu_activate, "open", "<StockItem>", GTK_STOCK_OPEN},
{"/ file (_F) /save", NULL, on_menu_activate, "save","<StockItem>", GTK_STOCK_SAVE},
{"/ file (_F) /quit", NULL, on_menu_activate, "quit","<StockItem>", GTK_STOCK_QUIT}
};
编译时错误如下:
-----------------------------------------
make -f Makefile.itemfact_DEBUG ...
g++ -o itemfact itemfact.cpp `pkg-config --cflags --libs gtk+-2.0`
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `void (*)(GtkMenuItem*, void*)' to `
void (*)()'
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `const char*' to `unsigned int'
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `void (*)(GtkMenuItem*, void*)' to `
void (*)()'
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `const char*' to `unsigned int'
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `void (*)(GtkMenuItem*, void*)' to `
void (*)()'
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `const char*' to `unsigned int'
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `void (*)(GtkMenuItem*, void*)' to `
void (*)()'
//McLinux/root/itemfact/itemfact.cpp(26): invalid conversion from `const char*' to `unsigned int'
make: *** [all] Error 1
*********Make Finished*********
请问我错在什么地方?该怎样改正?谢谢 |
|