Author Topic: Error in GTK project...  (Read 6664 times)

Offline shahdharmit

  • Single posting newcomer
  • *
  • Posts: 3
Error in GTK project...
« on: October 19, 2009, 06:06:08 pm »
Hello,

I created a new GTK+ project. I haven't written a single word in the main.c file except naming it HelloWorld during creation. TO see whether it works or not, I built and ran the project as is. But it gave me a following list of errors.

||=== HelloWorld, Debug ===|
/home/dharmit/gtk projects/HelloWorld/main.c|1|error: stdlib.h: No such file or directory|
/usr/lib/gcc/i586-redhat-linux/4.4.1/include/limits.h|122|error: limits.h: No such file or directory|
/usr/include/glib-2.0/glib/gbacktrace.h|35|error: signal.h: No such file or directory|
/usr/include/glib-2.0/glib/gbookmarkfile.h|28|error: time.h: No such file or directory|
/usr/include/glib-2.0/glib/gbookmarkfile.h|126|error: expected declaration specifiers or ‘...’ before ‘time_t’|
/usr/include/glib-2.0/glib/gbookmarkfile.h|133|error: expected declaration specifiers or ‘...’ before ‘time_t’|
/usr/include/glib-2.0/glib/gbookmarkfile.h|152|error: expected declaration specifiers or ‘...’ before ‘time_t’|
/usr/include/glib-2.0/glib/gbookmarkfile.h|153|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_added’|
/usr/include/glib-2.0/glib/gbookmarkfile.h|158|error: expected declaration specifiers or ‘...’ before ‘time_t’|
/usr/include/glib-2.0/glib/gbookmarkfile.h|159|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_modified’|
/usr/include/glib-2.0/glib/gbookmarkfile.h|164|error: expected declaration specifiers or ‘...’ before ‘time_t’|
/usr/include/glib-2.0/glib/gbookmarkfile.h|165|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_visited’|
/usr/include/glib-2.0/glib/gdate.h|174|error: expected declaration specifiers or ‘...’ before ‘time_t’|
/usr/include/glib-2.0/glib/gdate.h|228|warning: ‘struct tm’ declared inside parameter list|
/usr/include/glib-2.0/glib/gdate.h|228|warning: its scope is only this definition or declaration, which is probably not what you want|
/usr/include/pango-1.0/pango/pango-utils.h|25|error: stdio.h: No such file or directory|
/usr/include/pango-1.0/pango/pango-utils.h|34|error: expected ‘)’ before ‘*’ token|
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h|183|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_added’|
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h|184|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_modified’|
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h|185|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_visited’|
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h|191|error: expected declaration specifiers or ‘...’ before ‘time_t’|
||=== Build finished: 19 errors, 2 warnings ===|

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error in GTK project...
« Reply #1 on: October 19, 2009, 06:52:14 pm »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline shahdharmit

  • Single posting newcomer
  • *
  • Posts: 3
Re: Error in GTK project...
« Reply #2 on: October 19, 2009, 08:22:48 pm »
Thanks. I did search forum a bit but being new to C:B I couldn't figure out the appropriate keyword. As per the link, I turned on the Full Compiler Log. And here's the Build Log.


-------------- Build: Debug in HelloWorld ---------------

gcc -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -Wall  -g     -c "/home/dharmit/gtk projects/HelloWorld/main.c" -o obj/Debug/main.o
/home/dharmit/gtk projects/HelloWorld/main.c:1:20: error: stdlib.h: No such file or directory
In file included from /usr/lib/gcc/i586-redhat-linux/4.4.1/include/syslimits.h:7,
                 from /usr/lib/gcc/i586-redhat-linux/4.4.1/include/limits.h:11,
                 from /usr/lib/glib-2.0/include/glibconfig.h:11,
                 from /usr/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glib-2.0/gobject/gtype.h:26,
                 from /usr/include/glib-2.0/gobject/gboxed.h:26,
                 from /usr/include/glib-2.0/glib-object.h:25,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/lib/gcc/i586-redhat-linux/4.4.1/include/limits.h:122:61: error: limits.h: No such file or directory
In file included from /usr/include/glib-2.0/glib.h:36,
                 from /usr/include/glib-2.0/gobject/gtype.h:26,
                 from /usr/include/glib-2.0/gobject/gboxed.h:26,
                 from /usr/include/glib-2.0/glib-object.h:25,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/include/glib-2.0/glib/gbacktrace.h:35:20: error: signal.h: No such file or directory
In file included from /usr/include/glib-2.0/glib.h:38,
                 from /usr/include/glib-2.0/gobject/gtype.h:26,
                 from /usr/include/glib-2.0/gobject/gboxed.h:26,
                 from /usr/include/glib-2.0/glib-object.h:25,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/include/glib-2.0/glib/gbookmarkfile.h:28:18: error: time.h: No such file or directory
In file included from /usr/include/glib-2.0/glib.h:38,
                 from /usr/include/glib-2.0/gobject/gtype.h:26,
                 from /usr/include/glib-2.0/gobject/gboxed.h:26,
                 from /usr/include/glib-2.0/glib-object.h:25,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/include/glib-2.0/glib/gbookmarkfile.h:126: error: expected declaration specifiers or ‘...’ before ‘time_t’
/usr/include/glib-2.0/glib/gbookmarkfile.h:133: error: expected declaration specifiers or ‘...’ before ‘time_t’
/usr/include/glib-2.0/glib/gbookmarkfile.h:152: error: expected declaration specifiers or ‘...’ before ‘time_t’
/usr/include/glib-2.0/glib/gbookmarkfile.h:153: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_added’
/usr/include/glib-2.0/glib/gbookmarkfile.h:158: error: expected declaration specifiers or ‘...’ before ‘time_t’
/usr/include/glib-2.0/glib/gbookmarkfile.h:159: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_modified’
/usr/include/glib-2.0/glib/gbookmarkfile.h:164: error: expected declaration specifiers or ‘...’ before ‘time_t’
/usr/include/glib-2.0/glib/gbookmarkfile.h:165: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_visited’
In file included from /usr/include/glib-2.0/glib.h:44,
                 from /usr/include/glib-2.0/gobject/gtype.h:26,
                 from /usr/include/glib-2.0/gobject/gboxed.h:26,
                 from /usr/include/glib-2.0/glib-object.h:25,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/include/glib-2.0/glib/gdate.h:174: error: expected declaration specifiers or ‘...’ before ‘time_t’
/usr/include/glib-2.0/glib/gdate.h:228: warning: ‘struct tm’ declared inside parameter list
/usr/include/glib-2.0/glib/gdate.h:228: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from /usr/include/pango-1.0/pango/pango.h:46,
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:37,
                 from /usr/include/gtk-2.0/gdk/gdkscreen.h:32,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/include/pango-1.0/pango/pango-utils.h:25:19: error: stdio.h: No such file or directory
In file included from /usr/include/pango-1.0/pango/pango.h:46,
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:37,
                 from /usr/include/gtk-2.0/gdk/gdkscreen.h:32,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/include/pango-1.0/pango/pango-utils.h:34: error: expected ‘)’ before ‘*’ token
In file included from /usr/include/gtk-2.0/gtk/gtkrecentaction.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:148,
                 from /home/dharmit/gtk projects/HelloWorld/main.c:2:
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:183: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_added’
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:184: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_modified’
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:185: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_visited’
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:191: error: expected declaration specifiers or ‘...’ before ‘time_t’
Process terminated with status 1 (0 minutes, 3 seconds)
19 errors, 2 warnings
 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error in GTK project...
« Reply #3 on: October 19, 2009, 09:00:42 pm »
Here is you answer: http://www.nabble.com/what-packages-icludes-stdio.h-stdlib.h-....-td15207198.html

2 minutes spend with google- search term: "redhad error: stdlib.h: No such file or directory"

p.s. please use code tags when you post long logs
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline shahdharmit

  • Single posting newcomer
  • *
  • Posts: 3
Re: Error in GTK project...
« Reply #4 on: October 20, 2009, 06:16:34 am »
Thanks. That solved it.