Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: gtk/gtk.h  (gelezen 1287 keer)

Offline n3p3nthess

  • Lid
  • Steunpunt: Nee
gtk/gtk.h
« Gepost op: 2007/05/02, 12:02:48 »
Als ik een C (gtk) code wil compileren krijg ik een hele reeks fouten, kan het zijn dat ik de verkeerde bibliotheek heb geinstalleerd?

Dit is de code:

#include

int main(int argc, char* argv[])
{
   GtkWidget* window;
   gtk_init(&argc, &argv);
   window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_widget_show(window);
   gtk_main()
   return 0;
}


dit is de output na het commando; gcc -Wall -g Listing.c -o Listing
frederick@SoLinUb:/media/Data/Humane_Aspecten_Informatica$ gcc -Wall -g Listing_3_3.c -o Listing_3_3

In file included from /usr/include/gdk/gdkcairo.h:23,
                 from /usr/include/gdk/gdk.h:30,
                 from /usr/include/gtk/gtk.h:31,
                 from Listing_3_3.c:1:
/usr/include/gdk/gdkcolor.h:30:19: error: cairo.h: No such file or directory
In file included from /usr/include/gdk/gdkcolor.h:31,
                 from /usr/include/gdk/gdkcairo.h:23,
                 from /usr/include/gdk/gdk.h:30,
                 from /usr/include/gtk/gtk.h:31,
                 from Listing_3_3.c:1:
/usr/include/gdk/gdktypes.h:32:18: error: glib.h: No such file or directory
/usr/include/gdk/gdktypes.h:33:25: error: pango/pango.h: No such file or directory
/usr/include/gdk/gdktypes.h:34:25: error: glib-object.h: No such file or directory
/usr/include/gdk/gdktypes.h:51:23: error: gdkconfig.h: No such file or directoryIn file included from /usr/include/gdk/gdkcolor.h:31,
                 from /usr/include/gdk/gdkcairo.h:23,
                 from /usr/include/gdk/gdk.h:30,
                 from /usr/include/gtk/gtk.h:31,
                 from Listing_3_3.c:1:

Offline Johan van Dijk

  • Administrator
    • johanvandijk
  • Steunpunt: Nee
gtk/gtk.h
« Reactie #1 Gepost op: 2007/05/02, 14:22:05 »
Heb je de pakketten build-essential, libgtk1.2-dev en libgtk2.0-dev geïnstalleerd?
Waarschijnlijk krijg je nog wel meer foutmeldingen nadat je deze pakketten geïnstalleerd hebt.
Op http://packages.ubuntu.com/ kan je zoeken naar packages waar het bestand in zou moeten zitten.
Vrijwel altijd heb je de -dev pakketten nodig.

Offline n3p3nthess

  • Lid
  • Steunpunt: Nee
gtk/gtk.h
« Reactie #2 Gepost op: 2007/05/02, 15:27:26 »
Ik had enkel libgtk2.0-dev geinstalleerd
Zal even kijken of het nu wel gaat

Offline n3p3nthess

  • Lid
  • Steunpunt: Nee
gtk/gtk.h
« Reactie #3 Gepost op: 2007/05/02, 15:44:55 »
Ik heb de build essentials en libgtk1.2-dev geinstalleerd. en nu krijg ik dde volgende foutmelding

frederick@SoLinUb:/media/Data/Humane_Aspecten_Informatica$ gcc -Wall -g Listing_3_3.c -o Listing_3_3
In file included from Listing_3_3.c:1:
/usr/include/gtk-1.2/gtk/gtk.h:31:21: error: gdk/gdk.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:32:31: error: gtk/gtkaccelgroup.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:33:31: error: gtk/gtkaccellabel.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:34:31: error: gtk/gtkadjustment.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:35:30: error: gtk/gtkalignment.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:36:24: error: gtk/gtkarg.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:37:32: error: gtk/gtkaspectframe.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:38:26: error: gtk/gtkarrow.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:39:24: error: gtk/gtkbin.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:40:29: error: gtk/gtkbindings.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:41:24: error: gtk/gtkbox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:42:25: error: gtk/gtkbbox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:43:27: error: gtk/gtkbutton.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:44:29: error: gtk/gtkcalendar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:45:32: error: gtk/gtkcheckbutton.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:46:34: error: gtk/gtkcheckmenuitem.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:47:26: error: gtk/gtkclist.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:48:29: error: gtk/gtkcolorsel.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:49:26: error: gtk/gtkcombo.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:50:27: error: gtk/gtkcompat.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:51:30: error: gtk/gtkcontainer.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:52:26: error: gtk/gtkctree.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:53:26: error: gtk/gtkcurve.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:54:25: error: gtk/gtkdata.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:55:27: error: gtk/gtkdialog.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:56:24: error: gtk/gtkdnd.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:57:32: error: gtk/gtkdrawingarea.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:58:29: error: gtk/gtkeditable.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:59:26: error: gtk/gtkentry.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:60:26: error: gtk/gtkenums.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:61:29: error: gtk/gtkeventbox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:62:29: error: gtk/gtkfeatures.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:63:28: error: gtk/gtkfilesel.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:64:26: error: gtk/gtkfixed.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:65:28: error: gtk/gtkfontsel.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:66:26: error: gtk/gtkframe.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:67:26: error: gtk/gtkgamma.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:68:23: error: gtk/gtkgc.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:69:30: error: gtk/gtkhandlebox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:70:25: error: gtk/gtkhbox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:71:26: error: gtk/gtkhbbox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:72:27: error: gtk/gtkhpaned.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:73:27: error: gtk/gtkhruler.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:74:27: error: gtk/gtkhscale.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:75:31: error: gtk/gtkhscrollbar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:76:31: error: gtk/gtkhseparator.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:77:26: error: gtk/gtkimage.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:78:32: error: gtk/gtkinputdialog.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:79:25: error: gtk/gtkitem.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:80:32: error: gtk/gtkitemfactory.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:81:26: error: gtk/gtklabel.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:82:27: error: gtk/gtklayout.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:83:25: error: gtk/gtklist.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:84:29: error: gtk/gtklistitem.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:85:25: error: gtk/gtkmain.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:86:25: error: gtk/gtkmenu.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:87:28: error: gtk/gtkmenubar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:88:32: error: gtk/gtkmenufactory.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:89:29: error: gtk/gtkmenuitem.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:90:30: error: gtk/gtkmenushell.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:91:25: error: gtk/gtkmisc.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:92:29: error: gtk/gtknotebook.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:93:27: error: gtk/gtkobject.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:94:31: error: gtk/gtkoptionmenu.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:95:27: error: gtk/gtkpacker.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:96:26: error: gtk/gtkpaned.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:97:27: error: gtk/gtkpixmap.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:98:25: error: gtk/gtkplug.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:99:28: error: gtk/gtkpreview.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:100:29: error: gtk/gtkprogress.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:101:32: error: gtk/gtkprogressbar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:102:32: error: gtk/gtkradiobutton.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:103:34: error: gtk/gtkradiomenuitem.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:104:26: error: gtk/gtkrange.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:105:23: error: gtk/gtkrc.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:106:26: error: gtk/gtkruler.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:107:26: error: gtk/gtkscale.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:108:30: error: gtk/gtkscrollbar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:109:35: error: gtk/gtkscrolledwindow.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:110:30: error: gtk/gtkselection.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:111:30: error: gtk/gtkseparator.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:112:27: error: gtk/gtksignal.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:113:27: error: gtk/gtksocket.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:114:31: error: gtk/gtkspinbutton.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:115:26: error: gtk/gtkstyle.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:116:30: error: gtk/gtkstatusbar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:117:26: error: gtk/gtktable.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:118:36: error: gtk/gtktearoffmenuitem.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:119:25: error: gtk/gtktext.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:120:27: error: gtk/gtkthemes.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:121:30: error: gtk/gtktipsquery.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:122:33: error: gtk/gtktogglebutton.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:123:28: error: gtk/gtktoolbar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:124:29: error: gtk/gtktooltips.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:125:25: error: gtk/gtktree.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:126:29: error: gtk/gtktreeitem.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:127:30: error: gtk/gtktypeutils.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:128:25: error: gtk/gtkvbox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:129:26: error: gtk/gtkvbbox.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:130:29: error: gtk/gtkviewport.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:131:27: error: gtk/gtkvpaned.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:132:27: error: gtk/gtkvruler.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:133:27: error: gtk/gtkvscale.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:134:31: error: gtk/gtkvscrollbar.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:135:31: error: gtk/gtkvseparator.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:136:27: error: gtk/gtkwidget.h: No such file or directory
/usr/include/gtk-1.2/gtk/gtk.h:137:27: error: gtk/gtkwindow.h: No such file or directory
Listing_3_3.c: In function ‘main’:
Listing_3_3.c:5: error: ‘GtkWidget’ undeclared (first use in this function)
Listing_3_3.c:5: error: (Each undeclared identifier is reported only once
Listing_3_3.c:5: error: for each function it appears in.)
Listing_3_3.c:5: error: ‘window’ undeclared (first use in this function)
Listing_3_3.c:6: warning: implicit declaration of function ‘gtk_init’
Listing_3_3.c:7: warning: implicit declaration of function ‘gtk_window_new’
Listing_3_3.c:7: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)
Listing_3_3.c:8: warning: implicit declaration of function ‘gtk_widget_show’
Listing_3_3.c:9: warning: implicit declaration of function ‘gtk_main’
Listing_3_3.c:10: error: syntax error before ‘return’
Listing_3_3.c:11: warning: control reaches end of non-void function
frederick@SoLinUb:/media/Data/Humane_Aspecten_Informatica$

Offline Johan van Dijk

  • Administrator
    • johanvandijk
  • Steunpunt: Nee
gtk/gtk.h
« Reactie #4 Gepost op: 2007/05/02, 16:30:16 »
Geen idee wat je probeert te compileren, maar zit er geen readme bij waar in staat hoe je het moet compileren?
Staat er geen configure script in de map waar ook de source bestanden in staan?