LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can't install GTK gui building package (https://www.linuxquestions.org/questions/linux-software-2/cant-install-gtk-gui-building-package-796092/)

nakul 03-17-2010 02:15 PM

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...

knudfl 03-17-2010 04:00 PM

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/
.....

nakul 03-18-2010 01:00 PM

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..

knudfl 03-18-2010 02:31 PM

1 Attachment(s)
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
.....

nakul 03-19-2010 03:48 AM

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.

knudfl 03-19-2010 05:50 AM

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".

.....

knudfl 03-21-2010 05:55 AM

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'
.....


All times are GMT -5. The time now is 07:18 AM.