LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 10-07-2006, 11:41 AM   #1
anksphenomenon
LQ Newbie
 
Registered: Apr 2006
Location: India
Posts: 9

Rep: Reputation: 0
GTK Installation on FC5 not working !


Hi Guys,

I am trying to make a desktop application on GTK,C.
I tried to yum install gtk* on my system.
I think there was gtk already installed on my system since i have xmms running.

when i tried running the first program from the gtk.org tutorial, it ran fine. but when i did the hello world program, it gave me compile errors. This led me to compile
as 'gcc -v ...... gtk+' . this way i saw that the compilation is picking files from gtk1.2 and NOT gtk 2.0 that was supposedly installed by yum.

so I did a yum remove gtk* (and ran into trouble with my system so updated kde and gnome packages :P)
then i again did a yum install gtk* but it still gives me compile errors. a google told me that it needs gtk2.0 to work! and i think I installed it!

what to do? (
 
Old 10-07-2006, 01:09 PM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
I think gtk and gtk2 are installed on your system. Maybe you need to install gtk2-devel in order for your programs to work. Can you post the output of
Code:
$rpm -qa | grep -i gtk
 
Old 10-09-2006, 12:39 AM   #3
anksphenomenon
LQ Newbie
 
Registered: Apr 2006
Location: India
Posts: 9

Original Poster
Rep: Reputation: 0
gtk+-1.2.10-50
gtkglext-1.2.0-3.fc5
gtkhtml-1.1.9-12
gtkglarea2-1.99.0-6.fc5
gtkhtml-devel-1.1.9-12
gtk-gnutella-0.96.1-1.fc5
gtkhtml2-devel-2.6.3-1.2.1
gtkglextmm-1.2.0-4.fc5
gtkmathview-devel-0.7.6-3.fc5
gtkglextmm-devel-1.2.0-4.fc5
gtk-engines-0.12-7.2.1
gtk-sharp2-gapi-2.8.2-1
gtk-sharp2-2.8.2-1
gtk2-devel-2.8.20-1
gtksourceview-1.6.2-1.fc5
gtkmm24-devel-2.8.8-1.fc5
gtkmathview-0.7.6-3.fc5
gtkspell-devel-2.0.11-1.2.1
gtkpod-0.99.4-1.lvn5
gtk-qt-engine-0.70-2.fc5
gtksourceview-devel-1.6.2-1.fc5
gtk-xfce-engine-2.2.8-2.fc5
gtkwave-3.0.12-1.fc5
gtk-sharp-gapi-1.0.10-5
gtkhtml36-3.6.2-4.fc5
gtksourceview-sharp-2.0-23.fc5
gtkhtml3-devel-3.10.3-1.fc5.1
gtk2-2.8.20-1
gtkmm24-2.8.8-1.fc5
gtk+extra-2.1.1-2.fc5
gtkglarea2-devel-1.99.0-6.fc5
gtkdatabox-devel-0.7.0.0-2.fc5
gtklp-1.2.2-1.fc5
gtk-doc-1.6-1.fc5.1
gtkhtml2-2.6.3-1.2.1
gtksourceview-sharp-devel-2.0-23.fc5
gtk+-devel-1.2.10-50
gtkglext-devel-1.2.0-3.fc5
gtkdatabox-0.7.0.0-2.fc5
gtkterm-0.99.5-1.fc5
gtktalog-1.0.4-7.fc5
gtk2hs-doc-0.9.10-1.fc5
gtkhtml36-devel-3.6.2-4.fc5
gtkspell-2.0.11-1.2.1
gtk+extra-devel-2.1.1-2.fc5
gtkmm24-docs-2.8.8-1.fc5
gtk2-engines-2.7.4-3
gtkhtml3-3.10.3-1.fc5.1
gtk-sharp-1.0.10-5

this is the list i got...
waiting ...
 
Old 10-09-2006, 05:14 AM   #4
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Well gtk2-devel is installed fine so if your program does indeed use gtk2 and not gtk, I don't see why its not being picked up. Are you using examples from the gtk2 tutorial or the gtk 1.x tutorial?
 
Old 10-09-2006, 07:52 AM   #5
anksphenomenon
LQ Newbie
 
Registered: Apr 2006
Location: India
Posts: 9

Original Poster
Rep: Reputation: 0
what i get compiling the file with :

gcc -v test1.c -o test1 `pkg-config --cflags --libs gtk+`

is this :

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)
/usr/libexec/gcc/i386-redhat-linux/4.1.1/cc1 -quiet -v -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include test1.c -quiet -dumpbase test1.c -mtune=generic -auxbase test1 -version -o /tmp/ccbvUPsy.s
ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/gtk-1.2
/usr/include/glib-1.2
/usr/lib/glib/include
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.1/include
/usr/include
End of search list.
GNU C version 4.1.1 20060525 (Red Hat 4.1.1-1) (i386-redhat-linux)
compiled by GNU C version 4.1.1 20060525 (Red Hat 4.1.1-1).
GGC heuristics: --param ggc-min-expand=62 --param ggc-min-heapsize=60374
Compiler executable checksum: 7a31534f101210f86e6343d2c0c239f8
In file included from /usr/include/features.h:329,
from /usr/include/limits.h:27,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h:11,
from /usr/lib/glib/include/glibconfig.h:9,
from /usr/include/glib-1.2/glib.h:66,
from /usr/include/gtk-1.2/gdk/gdktypes.h:33,
from /usr/include/gtk-1.2/gdk/gdk.h:31,
from /usr/include/gtk-1.2/gtk/gtk.h:31,
from test1.c:1:
/usr/include/sys/cdefs.h:313:27: error: bits/wordsize.h: No such file or directory
In file included from /usr/include/features.h:352,
from /usr/include/limits.h:27,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h:11,
from /usr/lib/glib/include/glibconfig.h:9,
from /usr/include/glib-1.2/glib.h:66,
from /usr/include/gtk-1.2/gdk/gdktypes.h:33,
from /usr/include/gtk-1.2/gdk/gdk.h:31,
from /usr/include/gtk-1.2/gtk/gtk.h:31,
from test1.c:1:
/usr/include/gnu/stubs.h:11:3: error: #error "unexpected value for __WORDSIZE macro"
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h:11,
from /usr/lib/glib/include/glibconfig.h:9,
from /usr/include/glib-1.2/glib.h:66,
from /usr/include/gtk-1.2/gdk/gdktypes.h:33,
from /usr/include/gtk-1.2/gdk/gdk.h:31,
from /usr/include/gtk-1.2/gtk/gtk.h:31,
from test1.c:1:
/usr/include/limits.h:145:30: error: bits/posix1_lim.h: No such file or directory
/usr/include/limits.h:149:30: error: bits/posix2_lim.h: No such file or directory

when i specify the package as 2.0, with :

gcc -v test1.c -o test1 `pkg-config --cflags --libs gtk+-2.0`


i get :


Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)
/usr/libexec/gcc/i386-redhat-linux/4.1.1/cc1 -quiet -v test1.c -quiet -dumpbase test1.c -mtune=generic -auxbase test1 -version -o /tmp/ccGaEy5R.s
ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.1/include
/usr/include
End of search list.
GNU C version 4.1.1 20060525 (Red Hat 4.1.1-1) (i386-redhat-linux)
compiled by GNU C version 4.1.1 20060525 (Red Hat 4.1.1-1).
GGC heuristics: --param ggc-min-expand=62 --param ggc-min-heapsize=60374
Compiler executable checksum: 7a31534f101210f86e6343d2c0c239f8
test1.c:1:21: error: gtk/gtk.h: No such file or directory
test1.c:5: error: expected ‘)’ before ‘*’ token
test1.c:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘delete_event’
test1.c:30: error: expected ‘)’ before ‘*’ token
test1.c: In function ‘main’:
test1.c:40: error: ‘GtkWidget’ undeclared (first use in this function)
test1.c:40: error: (Each undeclared identifier is reported only once
test1.c:40: error: for each function it appears in.)
test1.c:40: error: ‘window’ undeclared (first use in this function)
test1.c:41: error: ‘button’ undeclared (first use in this function)
test1.c:48: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)
test1.c:56: error: ‘delete_event’ undeclared (first use in this function)
test1.c:56: error: ‘NULL’ undeclared (first use in this function)
test1.c:62: error: ‘destroy’ undeclared (first use in this function)
test1.c:74: error: ‘hello’ undeclared (first use in this function)
test1.c:80: error: ‘gtk_widget_destroy’ undeclared (first use in this function)
 
Old 10-09-2006, 08:03 AM   #6
anksphenomenon
LQ Newbie
 
Registered: Apr 2006
Location: India
Posts: 9

Original Poster
Rep: Reputation: 0
and whats the deal with package config file?
whats it used for ?
i have tried putting the package name (not gtkdevel but the gtk2.0 etc) but it didnt quite make a difference...
 
Old 10-18-2006, 01:49 PM   #7
anksphenomenon
LQ Newbie
 
Registered: Apr 2006
Location: India
Posts: 9

Original Poster
Rep: Reputation: 0
it so happened that the latest version available for download has rpms that are fc6 dependent! and I have FC5! and i came to know that only when i was asked for a version of i think atk that was an fc6 version :P

i think they should mention it there on the site that this downloadable version is for fc6..

My GTK is running fine now though thanks for all the trouble
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get a TV app working in FC5? Frelov Fedora 5 10-15-2006 02:06 PM
install FC5 not working nicetok Fedora 10 08-18-2006 10:25 PM
Name of FC5 GTK theme? AlexV Fedora 7 02-04-2006 08:08 AM
gtk-splitter installation is not working!! gnu4world Linux - Software 2 05-02-2003 03:10 PM


All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration