1753717 Members
4375 Online
108799 Solutions
New Discussion юеВ

gtk+

 
Norman_21
Honored Contributor

gtk+

The compiler can't seem to find the gtk, any ideas?

HPITHA1/usr/src/dx_chkpasswd > ls -lart
total 96
-rwx------ 1 root sys 231 Dec 11 2002 deploy.sh
-rw-r----- 1 root sys 694 Apr 9 2003 dx_chkpasswd.c
-rw-rw---- 1 root sys 4978 Apr 9 2003 dx_chkpasswd_glib.c
-rw-rw---- 1 root sys 477 Apr 9 2003 Makefile
drwxr-x--- 2 root sys 8192 Apr 9 2003 gtk
drwxr-xr-x 3 root sys 96 Apr 19 15:42 ..
drwxrwx--- 3 root sys 8192 Apr 19 15:43 .
HPITHA1/usr/src/dx_chkpasswd > ll gtk
total 96
-rw-rw---- 1 root sys 152 Apr 9 2003 Makefile
-rw-rw---- 1 root sys 1214 Apr 9 2003 gtk.h
-rw-rw---- 1 root sys 6224 Apr 9 2003 gtkmain.c
-rw-rw---- 1 root sys 2031 Apr 9 2003 gtkmain.h
-rw-r----- 1 root sys 5962 Apr 9 2003 gtkmain.o
-rw-rw---- 1 root sys 1507 Apr 9 2003 gtktypeutils.h
HPITHA1/usr/src/dx_chkpasswd > echo $SHLIB_PATH
/usr/src/dx_chkpasswd/gtk
HPITHA1/usr/src/dx_chkpasswd > ls -lart
HPITHA1/usr/src/dx_chkpasswd > echo $CC
/usr/local/bin/gcc
HPITHA1/usr/src/dx_chkpasswd > echo $SHLIB_PATH
/usr/src/dx_chkpasswd/gtk
HPITHA1/usr/src/dx_chkpasswd > /usr/local/bin/gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.23
Configured with: ../gcc/configure
Thread model: posix
gcc version 4.2.3
HPITHA1/usr/src/dx_chkpasswd > /usr/local/bin/gcc dx_chkpasswd_glib.c
dx_chkpasswd_glib.c:1:21: error: gtk/gtk.h: No such file or directory
dx_chkpasswd_glib.c:18: error: expected specifier-qualifier-list before 'gint'
dx_chkpasswd_glib.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_timeout'
dx_chkpasswd_glib.c:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_io_in'
dx_chkpasswd_glib.c:74: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_io_err'
dx_chkpasswd_glib.c:84: error: expected ')' before 'data'
dx_chkpasswd_glib.c:120: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_init'
dx_chkpasswd_glib.c:167: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_exit'
dx_chkpasswd_glib.c: In function 'main':
dx_chkpasswd_glib.c:205: error: 'my_init' undeclared (first use in this function)
dx_chkpasswd_glib.c:205: error: (Each undeclared identifier is reported only once
dx_chkpasswd_glib.c:205: error: for each function it appears in.)
dx_chkpasswd_glib.c:207: error: 'my_exit' undeclared (first use in this function)
dx_chkpasswd_glib.c:212: error: 'my_GlobalVars' has no member named 'rc'
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
22 REPLIES 22
James R. Ferguson
Acclaimed Contributor

Re: gtk+

Hi:

Is GTK installed? On an 11.31 server of mine:

# swlist|grep -i gtk
B6848BA 1.4.gm.46.16 Ximian GNOME 1.4 GTK+ Libraries for HP-UX
GTK 2.6.8.00.01 GTK+ 2.6 The Gnome GUI Runtime Toolkit
#

# find /opt -type f -name gtk.h
/opt/gnome/include/gtk-1.2/gtk/gtk.h
/opt/gnome/src/GTK+/gtk+-1.2.10/gtk/gtk.h
/opt/gtk2.6/include/gtk-2.0/gtk/gtk.h
#

Regards!

...JRF...
Norman_21
Honored Contributor

Re: gtk+

yes, it is installed but the compiler can't seem to locate the directory? Is there a variable that I need to set?
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Steven E. Protter
Exalted Contributor

Re: gtk+

Shalom,

Check your PATH, SHLIB_PATH and sd/ux

If you do not have gtk+ software it is available at http://www.hp.com/go/firefox

It is probably also available elsewhere but definitely at the link above as it is a pre-requisite for firefox.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: gtk+

>it is installed but the compiler can't seem to locate the directory? Is there a variable that I need to set?

You need to use -I to point the compiler to the include directory. Assuming you used find(1) like JRF did, it would be one of these:
-I/opt/gnome/include/gtk-1.2
-I/opt/gnome/src/GTK+/gtk+-1.2.10
-I/opt/gtk2.6/include/gtk-2.0

>SEP: Check your PATH, SHLIB_PATH

These won't help at compile time.
Norman_21
Honored Contributor

Re: gtk+

Dennis,

Thanks for the info. It appears that the gkt/gtk.h is in the source file which causes the "No such file or directory" error msg. However, even with the "-l" I still get the error.

HPITHA1/usr/src > export CC=gcc
HPITHA1/usr/src > gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.23
Configured with: ../gcc/configure
Thread model: posix
gcc version 4.2.3

/usr/src/dx_chkpasswd > gcc -l/opt/gnome/include/gtk-1.2/gtk dx_chkpasswd_glib.c -o dx_chkpasswd_glib.ex>
dx_chkpasswd_glib.c:1:21: error: gtk/gtk.h: No such file or directory
dx_chkpasswd_glib.c:18: error: expected specifier-qualifier-list before 'gint'
dx_chkpasswd_glib.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_timeout'
dx_chkpasswd_glib.c:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_io_in'
dx_chkpasswd_glib.c:74: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_io_err'
dx_chkpasswd_glib.c:84: error: expected ')' before 'data'
dx_chkpasswd_glib.c:120: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_init'
dx_chkpasswd_glib.c:167: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_exit'
dx_chkpasswd_glib.c: In function 'main':
dx_chkpasswd_glib.c:205: error: 'my_init' undeclared (first use in this function)
dx_chkpasswd_glib.c:205: error: (Each undeclared identifier is reported only once
dx_chkpasswd_glib.c:205: error: for each function it appears in.)
dx_chkpasswd_glib.c:207: error: 'my_exit' undeclared (first use in this function)
dx_chkpasswd_glib.c:212: error: 'my_GlobalVars' has no member named 'rc'

/usr/src/dx_chkpasswd>head dx_chkpasswd_glib.c
#include

#include
#include
#include
#include
#include
#include
#include

Any ideas?
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
James R. Ferguson
Acclaimed Contributor

Re: gtk+

Hi (again):

You specified the include directory as Dennis noted and did:

> gcc -l/opt/gnome/include/gtk-1.2/gtk

...but then in your source you specified:

> #include

I think you need, simply:

#include

...or:

# gcc -l/opt/gnome/include/gtk-1.2

...without the next directory.

Regards!

...JRF...


Regards!

...JRF...

Norman_21
Honored Contributor

Re: gtk+

James

I tried both methods with no luck. I'm beginning to think the errors aren't relative to gtk and perhaps something the source code needs adjustment. It was built by a programmer on 2003 who is no longer with us and we need to compile it for Itaniums. So your help will be highly appreciated!
I'm attaching the source code for your review and here is the output from the last attempt that has no gtk.h in the source code and rather using the "-l" to point the compiler:

/usr/src/dx_chkpasswd > /usr/local/bin/gcc -l/opt/gtk2.6/include/gtk-2.0 dx_chkpasswd_glib.c -o dx_chkpasswd_glib.exe
dx_chkpasswd_glib.c:16: error: expected specifier-qualifier-list before 'gint'
dx_chkpasswd_glib.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_timeout'
dx_chkpasswd_glib.c:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_io_in'
dx_chkpasswd_glib.c:72: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_io_err'
dx_chkpasswd_glib.c:82: error: expected ')' before 'data'
dx_chkpasswd_glib.c:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_init'
dx_chkpasswd_glib.c:165: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'my_exit'
dx_chkpasswd_glib.c: In function 'main':
dx_chkpasswd_glib.c:203: error: 'my_init' undeclared (first use in this function)
dx_chkpasswd_glib.c:203: error: (Each undeclared identifier is reported only once
dx_chkpasswd_glib.c:203: error: for each function it appears in.)
dx_chkpasswd_glib.c:205: error: 'my_exit' undeclared (first use in this function)
dx_chkpasswd_glib.c:210: error: 'my_GlobalVars' has no member named 'rc'
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Dennis Handly
Acclaimed Contributor

Re: gtk+

>It appears that the gkt/gtk.h is in the source file which causes the "No such file or directory" error msg. However, even with the "-l" I still get the error.
>gcc -l/opt/gnome/include/gtk-1.2/gtk

That's -I, not -l or -1. You need to cut&paste examples, not type by sight. Also, you added an extra path to the end.

>I'm attaching the source code for your review and here is the output from the last attempt that has no gtk.h in the source code

Why would you want to remove that header that defines gint?

>JRF: I think you need, simply: #include

You should use the documented include style and leave it alone and put the paths as I specified. Note: google finds it with gdk/gdk.h. (With the right option letter. :-)
Norman_21
Honored Contributor

Re: gtk+

Thanks for the tips Dennis but now I'm getting another error with glib.h, any thoughts?
see attached output.
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003