Installing GTK on Centos
I used
yum install " Development Tools" and
yum install gtk+-devel gtk2-devel.
In /usr/include directory I have gtk-2.0 directory.
I got a sample code to create a "hello world" window
Sample code is;
#include <gtk/gtk.h>
/* This is a callback function. The data arguments are ignored
* in this example. More on callbacks below. */
static void hello( GtkWidget *widget,
gpointer data )
{
g_print ("Hello World\n");
}
static gboolean delete_event( GtkWidget *widget,
GdkEvent *event,
gpointer data )
{
/* If you return FALSE in the "delete-event" signal handler,
* GTK will emit the "destroy" signal. Returning TRUE means
* you don't want the window to be destroyed.
* This is useful for popping up 'are you sure you want to quit?'
* type dialogs. */
g_print ("delete event occurred\n");
/* Change TRUE to FALSE and the main window will be destroyed with
* a "delete-event". */
return TRUE;
}
/* Another callback */
static void destroy( GtkWidget *widget,
gpointer data )
{
gtk_main_quit ();
}
int main( int argc,
char *argv[] )
{
/* GtkWidget is the storage type for widgets */
GtkWidget *window;
GtkWidget *button;
/* This is called in all GTK applications. Arguments are parsed
* from the command line and are returned to the application. */
gtk_init (&argc, &argv);
/* create a new window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* When the window is given the "delete-event" signal (this is given
* by the window manager, usually by the "close" option, or on the
* titlebar), we ask it to call the delete_event () function
* as defined above. The data passed to the callback
* function is NULL and is ignored in the callback function. */
g_signal_connect (window, "delete-event",
G_CALLBACK (delete_event), NULL);
/* Here we connect the "destroy" event to a signal handler.
* This event occurs when we call gtk_widget_destroy() on the window,
* or if we return FALSE in the "delete-event" callback. */
g_signal_connect (window, "destroy",
G_CALLBACK (destroy), NULL);
/* Sets the border width of the window. */
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
/* Creates a new button with the label "Hello World". */
button = gtk_button_new_with_label ("Hello World");
/* When the button receives the "clicked" signal, it will call the
* function hello() passing it NULL as its argument. The hello()
* function is defined above. */
g_signal_connect (button, "clicked",
G_CALLBACK (hello), NULL);
/* This will cause the window to be destroyed by calling
* gtk_widget_destroy(window) when "clicked". Again, the destroy
* signal could come from here, or the window manager. */
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
/* This packs the button into the window (a gtk container). */
gtk_container_add (GTK_CONTAINER (window), button);
/* The final step is to display this newly created widget. */
gtk_widget_show (button);
/* and the window */
gtk_widget_show (window);
/* All GTK applications must have a gtk_main(). Control ends here
* and waits for an event to occur (like a key press or
* mouse event). */
gtk_main ();
return 0;
}
I noticed that I don't have a /include/gtk/gtk.h; instead I have
/include/gtk-2.0/gtk/gtk.h
I am getting the follwing errors after compiling with g++
[root@localhost src]# g++ graphic5.cpp
graphic5.cpp:1:21: error: gtk/gtk.h: No such file or directory
graphic5.cpp:98:2: warning: no newline at end of file
graphic5.cpp:5: error: variable or field 'hello' declared void
graphic5.cpp:5: error: 'GtkWidget' was not declared in this scope
graphic5.cpp:5: error: 'widget' was not declared in this scope
graphic5.cpp:6: error: 'gpointer' was not declared in this scope
graphic5.cpp:6: error: initializer expression list treated as compound expression
graphic5.cpp:7: error: expected ',' or ';' before '{' token
graphic5.cpp:11: error: 'gboolean' does not name a type
graphic5.cpp:30: error: variable or field 'destroy' declared void
graphic5.cpp:30: error: 'GtkWidget' was not declared in this scope
graphic5.cpp:30: error: 'widget' was not declared in this scope
graphic5.cpp:31: error: 'gpointer' was not declared in this scope
graphic5.cpp:31: error: initializer expression list treated as compound expression
graphic5.cpp:32: error: expected ',' or ';' before '{' token
graphic5.cpp: In function 'int main(int, char**)':
graphic5.cpp:40: error: 'GtkWidget' was not declared in this scope
graphic5.cpp:40: error: 'window' was not declared in this scope
graphic5.cpp:41: error: 'button' was not declared in this scope
graphic5.cpp:45: error: 'gtk_init' was not declared in this scope
graphic5.cpp:48: error: 'GTK_WINDOW_TOPLEVEL' was not declared in this scope
graphic5.cpp:48: error: 'gtk_window_new' was not declared in this scope
graphic5.cpp:56: error: 'delete_event' was not declared in this scope
graphic5.cpp:56: error: 'G_CALLBACK' was not declared in this scope
graphic5.cpp:56: error: 'NULL' was not declared in this scope
graphic5.cpp:56: error: 'g_signal_connect' was not declared in this scope
graphic5.cpp:65: error: 'GTK_CONTAINER' was not declared in this scope
graphic5.cpp:65: error: 'gtk_container_set_border_width' was not declared in this scope
graphic5.cpp:68: error: 'gtk_button_new_with_label' was not declared in this scope
graphic5.cpp:80: error: 'gtk_widget_destroy' was not declared in this scope
graphic5.cpp:81: error: 'g_signal_connect_swapped' was not declared in this scope
graphic5.cpp:84: error: 'gtk_container_add' was not declared in this scope
graphic5.cpp:87: error: 'gtk_widget_show' was not declared in this scope
graphic5.cpp:95: error: 'gtk_main' was not declared in this scope
Changing the source code from #include <gtk/gtk.h> to #include <gtk-2.0/gtk/gtk.h> create the following errors;
[root@localhost src]# g++ graphic5.cpp
In file included from graphic5.cpp:1:
/usr/include/gtk-2.0/gtk/gtk.h:31:21: error: gdk/gdk.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:32:32: error: gtk/gtkaboutdialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:33:31: error: gtk/gtkaccelgroup.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:34:31: error: gtk/gtkaccellabel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:35:29: error: gtk/gtkaccelmap.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:36:31: error: gtk/gtkaccessible.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:37:27: error: gtk/gtkaction.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:38:32: error: gtk/gtkactiongroup.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:39:31: error: gtk/gtkadjustment.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:40:30: error: gtk/gtkalignment.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:41:26: error: gtk/gtkarrow.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:42:32: error: gtk/gtkaspectframe.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:43:30: error: gtk/gtkassistant.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:44:25: error: gtk/gtkbbox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:45:24: error: gtk/gtkbin.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:46:29: error: gtk/gtkbindings.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:47:24: error: gtk/gtkbox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:48:27: error: gtk/gtkbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:49:29: error: gtk/gtkcalendar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:50:31: error: gtk/gtkcelllayout.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:51:33: error: gtk/gtkcellrenderer.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:52:38: error: gtk/gtkcellrendereraccel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:53:38: error: gtk/gtkcellrenderercombo.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:54:39: error: gtk/gtkcellrendererpixbuf.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:55:41: error: gtk/gtkcellrendererprogress.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:56:37: error: gtk/gtkcellrendererspin.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:57:37: error: gtk/gtkcellrenderertext.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:58:39: error: gtk/gtkcellrenderertoggle.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:59:29: error: gtk/gtkcellview.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:60:32: error: gtk/gtkcheckbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:61:34: error: gtk/gtkcheckmenuitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:62:30: error: gtk/gtkclipboard.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:63:26: error: gtk/gtkclist.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:64:32: error: gtk/gtkcolorbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:65:29: error: gtk/gtkcolorsel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:66:35: error: gtk/gtkcolorseldialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:67:26: error: gtk/gtkcombo.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:68:29: error: gtk/gtkcombobox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:69:34: error: gtk/gtkcomboboxentry.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:70:30: error: gtk/gtkcontainer.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:71:26: error: gtk/gtkctree.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:72:26: error: gtk/gtkcurve.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:73:27: error: gtk/gtkdialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:74:24: error: gtk/gtkdnd.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:75:32: error: gtk/gtkdrawingarea.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:76:29: error: gtk/gtkeditable.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:77:26: error: gtk/gtkentry.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:78:36: error: gtk/gtkentrycompletion.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:79:26: error: gtk/gtkenums.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:80:29: error: gtk/gtkeventbox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:81:29: error: gtk/gtkexpander.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:82:28: error: gtk/gtkfilesel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:83:26: error: gtk/gtkfixed.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:84:38: error: gtk/gtkfilechooserbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:85:38: error: gtk/gtkfilechooserdialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:86:38: error: gtk/gtkfilechooserwidget.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:87:31: error: gtk/gtkfontbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:88:28: error: gtk/gtkfontsel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:89:26: error: gtk/gtkframe.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:90:26: error: gtk/gtkgamma.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:91:23: error: gtk/gtkgc.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:92:30: error: gtk/gtkhandlebox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:93:26: error: gtk/gtkhbbox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:94:25: error: gtk/gtkhbox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:95:27: error: gtk/gtkhpaned.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:96:27: error: gtk/gtkhruler.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:97:27: error: gtk/gtkhscale.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:98:31: error: gtk/gtkhscrollbar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:99:31: error: gtk/gtkhseparator.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:100:32: error: gtk/gtkiconfactory.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:101:30: error: gtk/gtkicontheme.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:102:29: error: gtk/gtkiconview.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:103:26: error: gtk/gtkimage.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:104:34: error: gtk/gtkimagemenuitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:105:30: error: gtk/gtkimcontext.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:106:36: error: gtk/gtkimcontextsimple.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:107:35: error: gtk/gtkimmulticontext.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:108:32: error: gtk/gtkinputdialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:109:30: error: gtk/gtkinvisible.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:110:25: error: gtk/gtkitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:111:32: error: gtk/gtkitemfactory.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:112:26: error: gtk/gtklabel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:113:27: error: gtk/gtklayout.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:114:31: error: gtk/gtklinkbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:115:25: error: gtk/gtklist.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:116:29: error: gtk/gtklistitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:117:30: error: gtk/gtkliststore.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:118:25: error: gtk/gtkmain.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:119:25: error: gtk/gtkmenu.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:120:28: error: gtk/gtkmenubar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:121:29: error: gtk/gtkmenuitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:122:30: error: gtk/gtkmenushell.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:123:35: error: gtk/gtkmenutoolbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:124:34: error: gtk/gtkmessagedialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:125:25: error: gtk/gtkmisc.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:126:28: error: gtk/gtkmodules.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:127:29: error: gtk/gtknotebook.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:128:27: error: gtk/gtkobject.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:129:32: error: gtk/gtkoldeditable.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:130:31: error: gtk/gtkoptionmenu.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:131:26: error: gtk/gtkpaned.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:132:27: error: gtk/gtkpixmap.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:133:25: error: gtk/gtkplug.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:134:28: error: gtk/gtkpreview.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:135:35: error: gtk/gtkprintoperation.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:136:29: error: gtk/gtkprogress.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:137:32: error: gtk/gtkprogressbar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:138:32: error: gtk/gtkradioaction.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:139:32: error: gtk/gtkradiobutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:140:34: error: gtk/gtkradiomenuitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:141:36: error: gtk/gtkradiotoolbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:142:26: error: gtk/gtkrange.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:143:23: error: gtk/gtkrc.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:144:34: error: gtk/gtkrecentchooser.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:145:40: error: gtk/gtkrecentchooserdialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:146:38: error: gtk/gtkrecentchoosermenu.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:147:40: error: gtk/gtkrecentchooserwidget.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:148:33: error: gtk/gtkrecentfilter.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:149:34: error: gtk/gtkrecentmanager.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:150:26: error: gtk/gtkruler.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:151:26: error: gtk/gtkscale.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:152:30: error: gtk/gtkscrollbar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:153:35: error: gtk/gtkscrolledwindow.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:154:30: error: gtk/gtkselection.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:155:30: error: gtk/gtkseparator.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:156:38: error: gtk/gtkseparatormenuitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:157:38: error: gtk/gtkseparatortoolitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:158:29: error: gtk/gtksettings.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:159:27: error: gtk/gtksignal.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:160:30: error: gtk/gtksizegroup.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:161:27: error: gtk/gtksocket.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:162:31: error: gtk/gtkspinbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:163:30: error: gtk/gtkstatusbar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:164:31: error: gtk/gtkstatusicon.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:165:26: error: gtk/gtkstock.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:166:26: error: gtk/gtkstyle.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:167:26: error: gtk/gtktable.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:168:36: error: gtk/gtktearoffmenuitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:169:25: error: gtk/gtktext.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:170:31: error: gtk/gtktextbuffer.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:171:39: error: gtk/gtktextbufferrichtext.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:172:29: error: gtk/gtktextview.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:173:30: error: gtk/gtktipsquery.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:174:33: error: gtk/gtktoggleaction.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:175:33: error: gtk/gtktogglebutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:176:37: error: gtk/gtktoggletoolbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:177:28: error: gtk/gtktoolbar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:178:31: error: gtk/gtktoolbutton.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:179:29: error: gtk/gtktoolitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:180:29: error: gtk/gtktooltips.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:181:25: error: gtk/gtktree.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:182:28: error: gtk/gtktreednd.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:183:29: error: gtk/gtktreeitem.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:184:30: error: gtk/gtktreemodel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:185:36: error: gtk/gtktreemodelfilter.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:186:34: error: gtk/gtktreemodelsort.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:187:34: error: gtk/gtktreeselection.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:188:30: error: gtk/gtktreestore.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:189:29: error: gtk/gtktreeview.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:190:35: error: gtk/gtktreeviewcolumn.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:191:30: error: gtk/gtktypeutils.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:192:30: error: gtk/gtkuimanager.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:193:26: error: gtk/gtkvbbox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:194:25: error: gtk/gtkvbox.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:195:28: error: gtk/gtkversion.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:196:29: error: gtk/gtkviewport.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:197:27: error: gtk/gtkvpaned.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:198:27: error: gtk/gtkvruler.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:199:27: error: gtk/gtkvscale.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:200:31: error: gtk/gtkvscrollbar.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:201:31: error: gtk/gtkvseparator.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:202:27: error: gtk/gtkwidget.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:203:27: error: gtk/gtkwindow.h: No such file or directory
graphic5.cpp:98:2: warning: no newline at end of file
graphic5.cpp:5: error: variable or field 'hello' declared void
graphic5.cpp:5: error: 'GtkWidget' was not declared in this scope
graphic5.cpp:5: error: 'widget' was not declared in this scope
graphic5.cpp:6: error: 'gpointer' was not declared in this scope
graphic5.cpp:6: error: initializer expression list treated as compound expression
graphic5.cpp:7: error: expected ',' or ';' before '{' token
graphic5.cpp:11: error: 'gboolean' does not name a type
graphic5.cpp:30: error: variable or field 'destroy' declared void
graphic5.cpp:30: error: 'GtkWidget' was not declared in this scope
graphic5.cpp:30: error: 'widget' was not declared in this scope
graphic5.cpp:31: error: 'gpointer' was not declared in this scope
graphic5.cpp:31: error: initializer expression list treated as compound expression
graphic5.cpp:32: error: expected ',' or ';' before '{' token
graphic5.cpp: In function 'int main(int, char**)':
graphic5.cpp:40: error: 'GtkWidget' was not declared in this scope
graphic5.cpp:40: error: 'window' was not declared in this scope
graphic5.cpp:41: error: 'button' was not declared in this scope
graphic5.cpp:45: error: 'gtk_init' was not declared in this scope
graphic5.cpp:48: error: 'GTK_WINDOW_TOPLEVEL' was not declared in this scope
graphic5.cpp:48: error: 'gtk_window_new' was not declared in this scope
graphic5.cpp:56: error: 'delete_event' was not declared in this scope
graphic5.cpp:56: error: 'G_CALLBACK' was not declared in this scope
graphic5.cpp:56: error: 'NULL' was not declared in this scope
graphic5.cpp:56: error: 'g_signal_connect' was not declared in this scope
graphic5.cpp:65: error: 'GTK_CONTAINER' was not declared in this scope
graphic5.cpp:65: error: 'gtk_container_set_border_width' was not declared in this scope
graphic5.cpp:68: error: 'gtk_button_new_with_label' was not declared in this scope
graphic5.cpp:80: error: 'gtk_widget_destroy' was not declared in this scope
graphic5.cpp:81: error: 'g_signal_connect_swapped' was not declared in this scope
graphic5.cpp:84: error: 'gtk_container_add' was not declared in this scope
graphic5.cpp:87: error: 'gtk_widget_show' was not declared in this scope
graphic5.cpp:95: error: 'gtk_main' was not declared in this scope
It seems I am missing a library at /include/gtk/ directory but as I mentioned, I already installed the GTK.
Manual moving the /include/gtk-2.0/gtk/ directory to /include/gtk didn't help either.
|