Re: gtk application compile error
hello, no gtk-config is running fine and it is also in mypath. below is what `gtk-config --libs --cflags` returns on my solaris box: -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/openwin/include-L/usr/local/lib -L/usr/openwin/lib -R/usr/openwin/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lsocket -lnsl -lm ok, now someone told me that i have configure gtk libraries through pkg-config. I have downloaded 'pkgconfig' from freedesktip.org. But, when i tried tobuild it i found that there is nothing like 'make' on my box. i downloaded 'gmake' from sunfreeware, installed it and try to compileand build pkg-config. make gave me some errors during compilation of pkg-config (anotherproblem without solving of previous one .. ). below is the output after running make for pkgconfig. # pwd/downloads/pkgconfig-0.15.0 # makemake all-recursivemake[1]: Entering directory `/downloads/pkgconfig-0.15.0'Making all in glib-1.2.8make[2]: Entering directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'make all-recursivemake[3]: Entering directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'Making all in .make[4]: Entering directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'/bin/sh ./libtool --mode=link gcc -g -O2 -Wall -D_REENTRANT -o libglib.la -version-info 0:8:0 -release 1.2 -export-dynamic garray.lo gcache.lo gcompletion.lo gdataset.lo gdate.lo gerror.lo ghash.lo ghook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprimes.lo grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lomkdir .libslibtool: link: warning: `-version-info' is ignored for convenience librarieslibtool: link: warning: `-release' is ignored for convenience librariesrm -fr .libs/libglib.la .libs/libglib.* .libs/libglib-1.2.*ar cru .libs/libglib.al garray.lo gcache.lo gcompletion.lo gdataset.lo gdate.lo gerror.lo ghash.lo ghook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprimes.lo grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lo./libtool: ar: not foundmake[4]: *** [libglib.la] Error 1make[4]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'make[3]: *** [all-recursive] Error 1make[3]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'make[2]: *** [all-recursive-am] Error 2make[2]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/downloads/pkgconfig-0.15.0'make: *** [all-recursive-am] Error 2 # these are the details plz help me. Raheel. - Original Message - From: "Cupitt, John" [EMAIL PROTECTED] To: "Raheel" [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 4:00 PM Subject: Re: gtk application compile error Hi again, so it can't find the gtk-config program. Either you have not installed it (it should be in /usr/local/bin), or itis not on your path.JohnRaheel wrote: hi cupitt , I have really used back back quotes, it was just a typing mistake when sending my request to you ppl on group. when i tried, # gcc -Wall wind.c -o wind.o `gtk-config --libs --cflags` it gave me a long list of missing headers. It was so long that i can'tpaste it here. If you need it , i will attach in a separate email. Raheel- Original Message - From: "Cupitt, John" [EMAIL PROTECTED] To: "Raheel" [EMAIL PROTECTED] Sent: Monday, February 24, 2003 5:34 PM Subject: Re: gtk application compile error Hi, you are using the wrong quotes. Try: gcc -Wall wind.c -o wind.o `gtk-config --libs --cflags` Note back quotes ` not forward quotes ' As Sven says, you should really use gtk2 for new code. Gtk1.2 is 4years old and is obsolete. John Raheel wrote: hi .I have written a very basic program using gtk_widgets.And tried the command line switches. Below is what i got when try tocompile:# gcc -Wall wind.c -o wind.o 'gtk-config --libs --cflags' gcc: gtk-config --libs --cflags: No such file or directory wind.c:2:21: gtk/gtk.h: No such file or directory wind.c: In function `main': wind.c:7: `GtkWidget' undeclared (first use in this function) wind.c:7: (Each undeclared identifier is reported only once wind.c:7: for each function it appears in.) wind.c:7: `window' undeclared (first use in this function) wind.c:9: warning: implicit declaration of function `gtk_init' wind.c:11: warning: implicit declaration of function `gtk_window_new' wind.c:11: `GTK_WINDOW_TOPLEVEL' undeclared (first use in this function) wind.c:12: warning: implicit declaration of function `gtk_widget_show' wind.c:14: warning: implicit declaration of function `gtk_main' plz help me, I am hanging between all this. Raheel.plz note my source code is:# include gtk/gtk.hint main( int argc, char *argv[] ){ GtkWidget *window; gtk_ini
Re: gtk application compile error
Obviously the compiler is having problems finding your development libraries. There may well be something wrong with your devel package, but you should be able to work round it. Run gtk-config --cflags and it should give a list of directories preceeded by a -I look in each of these and check that they first exist and that secondly one of them includes a folder gtk with a file gtk.h in it. The error is not due to you missing the include in your source, but because the compiler cannot find the required header. If you manage to find the header you can always add it manually to the arguments to the compiler with -I/path/to/header remember that the header must then be at /path/to/header/gtk/gtk.h hope this is of some help. Jon Wilson Raheel wrote: hi . I have written a very basic program using gtk_widgets. And tried the command line switches. Below is what i got when try to compile: # gcc -Wall wind.c -o wind.o 'gtk-config --libs --cflags' gcc: gtk-config --libs --cflags: No such file or directory wind.c:2:21: gtk/gtk.h: No such file or directory wind.c: In function `main': wind.c:7: `GtkWidget' undeclared (first use in this function) wind.c:7: (Each undeclared identifier is reported only once wind.c:7: for each function it appears in.) wind.c:7: `window' undeclared (first use in this function) wind.c:9: warning: implicit declaration of function `gtk_init' wind.c:11: warning: implicit declaration of function `gtk_window_new' wind.c:11: `GTK_WINDOW_TOPLEVEL' undeclared (first use in this function) wind.c:12: warning: implicit declaration of function `gtk_widget_show' wind.c:14: warning: implicit declaration of function `gtk_main' plz help me, I am hanging between all this. Raheel. plz note my source code is: # include gtk/gtk.h 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 (); //printf (this is first gcc program\n); //printf (%s, argv[1]); //printf (%s, argv[2]); return 0; } AND my development box is solaris 8.0 (sparc). ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
Hi, Raheel [EMAIL PROTECTED] writes: I have written a very basic program using gtk_widgets. And tried the command line switches. Below is what i got when try to compile: # gcc -Wall wind.c -o wind.o 'gtk-config --libs --cflags' are you perhaps using gtk+-2.x (you really should do) ? If so, you will want to use the following line instead: gcc -Wall wind.c -o wind.o 'pkg-config --libs --cflags gtk+-2.0' See http://developer.gnome.org/doc/API/2.0/gtk/gtk-compiling.html Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
hi Neumann below is what pkginfo reports me. # pkginfo -l SMCgtk+ PKGINST: SMCgtk+ NAME: gtk+ CATEGORY: application ARCH: sparc VERSION: 1.2.10 BASEDIR: /usr/local VENDOR: GTK Group PSTAMP: Steve Christensen INSTDATE: Feb 04 2003 10:00 EMAIL: [EMAIL PROTECTED] STATUS: completely installed FILES:647 installed pathnames 8 shared pathnames 134 directories 44 executables 64165 blocks used (approx) # It is 1.2.10. But just for hanging around when i try , it gives me a long list of err messgages (so long that i can't paste it here) indicating that so many files are not found (most of them were *.h). so i am still in dark, plz help Raheel. - Original Message - From: Sven Neumann [EMAIL PROTECTED] To: Raheel [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 24, 2003 2:57 PM Subject: Re: gtk application compile error Hi, Raheel [EMAIL PROTECTED] writes: I have written a very basic program using gtk_widgets. And tried the command line switches. Below is what i got when try to compile: # gcc -Wall wind.c -o wind.o 'gtk-config --libs --cflags' are you perhaps using gtk+-2.x (you really should do) ? If so, you will want to use the following line instead: gcc -Wall wind.c -o wind.o 'pkg-config --libs --cflags gtk+-2.0' See http://developer.gnome.org/doc/API/2.0/gtk/gtk-compiling.html Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
Hi, Raheel [EMAIL PROTECTED] writes: below is what pkginfo reports me. I was speaking of pkg-config, no idea what pkginfo is all about. It is 1.2.10. But just for hanging around when i try , it gives me a long list of err messgages (so long that i can't paste it here) indicating that so many files are not found (most of them were *.h). you shouldn't be developing with 1.2.10 any longer. Use 2.2.x instead. Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
ok I know you are talking about pkg-config, but I am telling you the version of gtk which is 1.2.10. You have told me to try ; # gcc -Wall wind.c -o wind.o 'pkg-config --libs --cflags gtk+-2.0' And my gtk is not 2.0. I think it should be clear now. Raheel. - Original Message - From: Sven Neumann [EMAIL PROTECTED] To: Raheel [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 24, 2003 4:17 PM Subject: Re: gtk application compile error Hi, Raheel [EMAIL PROTECTED] writes: below is what pkginfo reports me. I was speaking of pkg-config, no idea what pkginfo is all about. It is 1.2.10. But just for hanging around when i try , it gives me a long list of err messgages (so long that i can't paste it here) indicating that so many files are not found (most of them were *.h). you shouldn't be developing with 1.2.10 any longer. Use 2.2.x instead. Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
Raheel wrote: ok I know you are talking about pkg-config, but I am telling you the version of gtk which is 1.2.10. You have told me to try ; # gcc -Wall wind.c -o wind.o 'pkg-config --libs --cflags gtk+-2.0' How about gcc -Wall wind.c -o wind.o `gtk-config --libs --cflags` with the correct back tic's [`] Ben And my gtk is not 2.0. I think it should be clear now. Raheel. - Original Message - From: Sven Neumann [EMAIL PROTECTED] To: Raheel [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 24, 2003 4:17 PM Subject: Re: gtk application compile error Hi, Raheel [EMAIL PROTECTED] writes: below is what pkginfo reports me. I was speaking of pkg-config, no idea what pkginfo is all about. It is 1.2.10. But just for hanging around when i try , it gives me a long list of err messgages (so long that i can't paste it here) indicating that so many files are not found (most of them were *.h). you shouldn't be developing with 1.2.10 any longer. Use 2.2.x instead. Salut, Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
First, run gtk-config --libs --cflags and check each and every directories listed if the missing headers are there! On Mon, 2003-02-24 at 20:17, Raheel wrote: yes , i have tried it too. and it has given me a long list of errors. i have already told you ppl about that long list (most of them were missing headers). guyz i am very near to snatch my hairs plz help me Raheel. -- Alfredo P. Ricafort [EMAIL PROTECTED] The man-month is a fallacious and dangerous myth, for it implies that men and months are interchangeable - (F.P. Brooks Jr.,The Mythical Man-Month) ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
hello, below is what `gtk-config --libs --cflags` returns on my solaris box: -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/ glib/include -I/usr/openwin/include -L/usr/local/lib -L/usr/openwin/lib -R/usr/openwin/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lsocket -lnsl -lm Raheel. - Original Message - From: hostmaster [EMAIL PROTECTED] To: Raheel [EMAIL PROTECTED] Cc: gtk-mailing-list [EMAIL PROTECTED] Sent: Monday, February 24, 2003 5:52 PM Subject: Re: gtk application compile error First, run gtk-config --libs --cflags and check each and every directories listed if the missing headers are there! On Mon, 2003-02-24 at 20:17, Raheel wrote: yes , i have tried it too. and it has given me a long list of errors. i have already told you ppl about that long list (most of them were missing headers). guyz i am very near to snatch my hairs plz help me Raheel. -- Alfredo P. Ricafort [EMAIL PROTECTED] The man-month is a fallacious and dangerous myth, for it implies that men and months are interchangeable - (F.P. Brooks Jr.,The Mythical Man-Month) ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk application compile error
I have a folder inside /usr/local/include/gtk-1.2 named gtk and gtk.h is residing in this folder. I mean for gtk.h the complete path on my box is, /usr/local/include/gtk-1.2/gtk/gtk.h Raheel. - Original Message - From: "hostmaster" [EMAIL PROTECTED] To: "Raheel" [EMAIL PROTECTED] Cc: "gtk-mailing-list" [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 11:45 AM Subject: Re: gtk application compile error Yes, but are your missing headers there? For example, can you find gtk.h in /usr/local/include/gtk-1.2? On Tue, 2003-02-25 at 13:05, Raheel wrote: hello, below is what `gtk-config --libs --cflags` returns on my solaris box:-I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/ glib/include -I/usr/openwin/include -L/usr/local/lib -L/usr/openwin/lib -R/usr/openwin/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lsocket -lnsl -lmRaheel. -- Alfredo P. Ricafort [EMAIL PROTECTED] "The man-month is a fallacious and dangerous myth, for it implies that men and months are interchangeable" - (F.P. Brooks Jr.,The Mythical Man-Month)