hello,
no gtk-config is running fine and it is also in
my path.
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
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 to build it ........ i found that there
is nothing like 'make' on my box. i downloaded 'gmake' from sunfreeware,
installed it and try to compile and build pkg-config. make gave me some
errors during compilation of pkg-config (another problem without solving of
previous one ...... ).
below is the output after running make for
pkgconfig.
#
pwd
/downloads/pkgconfig-0.15.0
/downloads/pkgconfig-0.15.0
# make
make all-recursive
make[1]: Entering directory `/downloads/pkgconfig-0.15.0'
Making all in glib-1.2.8
make[2]: Entering directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make all-recursive
make[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 -r
elease 1.2 -export-dynamic garray.lo gcache.lo gcompletion.lo gdataset.lo gdate.lo gerror.lo ghash.l
o ghook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprime
s.lo grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lo
mkdir .libs
libtool: link: warning: `-version-info' is ignored for convenience libraries
libtool: link: warning: `-release' is ignored for convenience libraries
rm -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 g
hook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprimes.l
o grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lo
./libtool: ar: not found
make[4]: *** [libglib.la] Error 1
make[4]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/downloads/pkgconfig-0.15.0'
make: *** [all-recursive-am] Error 2
make all-recursive
make[1]: Entering directory `/downloads/pkgconfig-0.15.0'
Making all in glib-1.2.8
make[2]: Entering directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make all-recursive
make[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 -r
elease 1.2 -export-dynamic garray.lo gcache.lo gcompletion.lo gdataset.lo gdate.lo gerror.lo ghash.l
o ghook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprime
s.lo grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lo
mkdir .libs
libtool: link: warning: `-version-info' is ignored for convenience libraries
libtool: link: warning: `-release' is ignored for convenience libraries
rm -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 g
hook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprimes.l
o grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lo
./libtool: ar: not found
make[4]: *** [libglib.la] Error 1
make[4]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory `/downloads/pkgconfig-0.15.0/glib-1.2.8'
make[1]: *** [all-recursive] Error 1
make[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
Either you have not installed it (it should be in /usr/local/bin), or it
is not on your path.
John
Raheel 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't
paste
> 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 4
years
> 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 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).
>>
>
>
>