LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-17-2010, 02:15 PM   #1
nakul
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Rep: Reputation: 0
can't install GTK gui building package


hello,
i am using fedora-10,wants to install GTK+-2.18.7 or lower,so that i can built gui in 'C'.After several tries and installing needed libraries could not make it out.
can any one give me full list of required libraries and necessary procedure to install them in sequence.From where i can find the full package of these libraries.
thanks...
 
Old 03-17-2010, 04:00 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

The default, and already installed gtk+ is 'gtk2-2.14.4'

To get the full package, which includes the development
files, please install : gtk2-devel
1) su
2) yum install gtk2-devel
( Or use the package manager.)
Fedora 10 is outdated and unsupported. The usable repo URL,
the old archive, i386 :
http://download.fedora.redhat.com/pu...thing/i386/os/
Archive, old "Updates" , i386
http://download.fedora.redhat.com/pu...dates/10/i386/
.....

Last edited by knudfl; 03-18-2010 at 02:43 AM.
 
Old 03-18-2010, 01:00 PM   #3
nakul
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
thanks for reply and your precious advice
i have install gtk2-devel as you suggested.
but when i compiled the first program of GTK-tutorial 'base.c'
http://library.gnome.org/devel/gtk-t...SEC-HELLOWORLD
using gcc as :gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`


I got the below mention errors:
[root@sparkle ~]# gcc base.c base `pkg-config --cflags --libs gtk+-2.0`
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
gcc: base: No such file or directory
base.c:1:22: error: gtk/gtk.h: No such file or directory
base.c: In function ‘main’:
base.c:6: error: ‘GtkWidget’ undeclared (first use in this function)
base.c:6: error: (Each undeclared identifier is reported only once
base.c:6: error: for each function it appears in.)
base.c:6: error: ‘window’ undeclared (first use in this function)
base.c:10: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)
[root@sparkle ~]#

now,presently i am in this situation,
can you suggest me what to do after this..
thanks..
 
Old 03-18-2010, 02:31 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I get no errors. But please do not do any user command as root.
( Root is for administrative tasks only !.)
This is wrong :
[root@sparkle ~]# gcc base.c base `pkg-config --cflags --libs gtk+-2.0`

This one works :
gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
.. and provides "base"
./base , please see the image ..
( But I get : ""Invalid rate plugin version 10002
Hello World"" , when I click the button.)

? ? Have you checked : ls /usr/lib/pkgconfig/gtk+-2.0.pc
Should reply : /usr/lib/pkgconfig/gtk+-2.0.pc
.....
Attached Thumbnails
Click image for larger version

Name:	screen2791.jpg
Views:	15
Size:	3.1 KB
ID:	3071  

Last edited by knudfl; 03-18-2010 at 02:34 PM.
 
Old 03-19-2010, 03:48 AM   #5
nakul
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
thanks for quick reply
I have now correctly entered the compile statement as shown:
[nakul@sparkle ~]$ gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`

But again get the same error:

[nakul@sparkle ~]$ gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
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
base.c:2:21: error: gtk/gtk.h: No such file or directory
base.c: In function ‘main’:
base.c:7: error: ‘GtkWidget’ undeclared (first use in this function)
base.c:7: error: (Each undeclared identifier is reported only once
base.c:7: error: for each function it appears in.)
base.c:7: error: ‘window’ undeclared (first use in this function)
base.c:11: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)
[nakul@sparkle ~]$

I have also check this: ls /usr/lib/pkgconfig/gtk+-2.0.pc
and get this:
[nakul@sparkle ~]$ ls /usr/lib/pkgconfig/gtk+-2.0.pc
/usr/lib/pkgconfig/gtk+-2.0.pc -------> as you expected
[nakul@sparkle ~]$

I had taken mention link for reference for compiling libraries in sequence:
http://www.linuxforums.org/forum/lin...-programs.html

but during configuring lib-autoconfig i get the error for expat library ( says it is too old).
now, i can't make out where did i go wrong.
 
Old 03-19-2010, 05:50 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Yes, that's strange. May be this will work :

export PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig

It usually does, for adding a new path for pkgconfig.

But anyway, /usr/lib/pkgconfig should be your
default "pkgconfig path".

.....
 
Old 03-21-2010, 05:55 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Message from @nakul :
Hello,knudfl. Can you suggest me any gui building other
than GTK on linux based on 'C' language.
I am just tired of ./configure -->make---->make install every time.
Actually i want to build user interface for my project based on network
socket application(which presently work on command line).
Can you also suggest me any library package for database connectivity
through C language.thanks for your suggestions.
-------------------------------------------------------------------


Other GUI toolkits : QT ( c++ ), gtkmm ( c++ ? ), FOX Toolkit,
FLTK, and wxWindows.
This overview is old, not all the info is relevant any more
http://freshmeat.net/articles/gui-to...-window-system

Fox http://www.linuxsoft.cz/en/sw_detail.php?id_item=1199
FLTK http://www.fltk.org/

yum install fltk-devel gtkmm24-devel qt-devel qt3-devel wxGTK-devel
.. provides the most. Please use # yum search <name> , for more.
.....

"./configure && make && make install", i.e. autotools are meant
to make things easy. Instead of writing a Makefile youself.
Other build tools, example : 'cmake'
.....
 
  


Reply



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
Building a Slackware Package when trackinstall -i="make install" fails Alexvader Slackware 2 12-12-2009 01:39 PM
Install-package manager GUI crashes alpha1truth SUSE / openSUSE 1 10-25-2007 04:46 AM
Building gtk+-2.10.8 but get a undefined reference to g_thread_gettime Haraldsh Linux - Software 5 03-13-2007 02:29 AM
Having trouble building and installing GTK+ Plz Help! Gormless Linux - Software 5 10-10-2004 09:26 PM
What package do I install to get gtk? forestial Debian 1 08-12-2004 10:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:25 AM.

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
Open Source Consulting | Domain Registration