LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-25-2005, 11:50 AM   #1
blankdev
LQ Newbie
 
Registered: Nov 2005
Location: Diamond Bar, California
Distribution: Ubuntu
Posts: 11

Rep: Reputation: 0
(ubuntu) Glade Problems


Hey guys, after looking at WxWidgets, QT, etc., I thought I'd try GLADE. I downloaded build-essential, glade, and all other stuff that it needed (the dependencies were handled and I didn't see/forgot). Everything runs fine, I just made a window (didn't rename) and a fixed position widget, and I made a button, not altering any of them from the defaults. Now, when I build code, (I've tried C and C++), everything seems to go alright. After, I go into the directory and do ./autogen.sh. First it had a lot of errors, now, most of them are fixed since I downloaded a library that was -dev or something, I think it was glib-dev, or something else, some were solved. It's just an error that says GTK didn't meet requirements, but apparently I have the latest GTK (I think). Sorry guys, I'm very new to programming in linux, here's the output I get:

Quote:
jorge@blankpc:~/Projects/test$ sh ./autogen.sh
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.

processing .
Creating ./aclocal.m4 ...
Running glib-gettextize... Ignore non-fatal messages.
Copying file mkinstalldirs
Copying file po/Makefile.in.in

Please add the files
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
progtest.m4
from the /usr/share/aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
(gnu ftp site, censored cause I have less than 5 posts, not allowed to show URLs).

Making ./aclocal.m4 writable ...
Running aclocal ...
Running autoheader...
Running automake --gnu ...
automake: configure.in: installing `./install-sh'
automake: configure.in: installing `./missing'
automake: configure.in: installing `./config.guess'
automake: configure.in: installing `./config.sub'
automake: Makefile.am: installing `./INSTALL'
automake: Makefile.am: installing `./COPYING'
Running autoconf ...
Running ./configure --enable-maintainer-mode ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... missing
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for strerror in -lcposix... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PACKAGE... configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively you may set the PACKAGE_CFLAGS and PACKAGE_LIBS environment variables
to avoid the need to call pkg-config. See the pkg-config man page for
more details.
Sorry for the long quote, but I think everything helps. I appreciate any help I get, thanks.
 
Old 11-25-2005, 11:56 PM   #2
blankdev
LQ Newbie
 
Registered: Nov 2005
Location: Diamond Bar, California
Distribution: Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
If you guys dont know just tell me
 
Old 12-20-2007, 09:56 PM   #3
mr incredible
LQ Newbie
 
Registered: Nov 2007
Distribution: ubuntu
Posts: 9

Rep: Reputation: 0
I have been having some glade errors on 7.04. I honestly do not understand what the issue is.
 
Old 12-26-2007, 03:56 PM   #4
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
I don't know where to begin....

I must make the assumption that you are using Anjuta or some other IDE as you wouldn't have autogen.sh for your application if you were coding by hand.

The -dev packages you speak of are critical. If you have installed libgtk2.0-dev (ubuntu) then the dependencies will have been resolved for you. The reason you need the -dev packages as well as the regular ones, are because you need the header files (gtk.h, glib.h, etc.) for compiling GTK programs. It sounds like you've installed libglib2.0-dev but not libgtk2.0-dev.

The configure script error:
Code:
checking for PACKAGE... configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met.
Is telling you that gtk+-2.0 development files are not installed. What it's doing to determine this, is using a program called pkg-config which we use in GTK+ development a lot.

For example, on my system, I can use pkg-config to see what versions of development packages I have for gtk and glib:

Code:
micah@Desktop:~$ pkg-config --modversion gtk+-2.0 glib-2.0
2.12.0
2.14.1
This is how I know both gtk+ and glib development packages are installed correctly.

Furthermore, pkg-config will be used when compiling a GTK+ application.

A simple GTK+ development install on Ubuntu with a quick test might go something like this:

Code:
sudo aptitude install libgtk2.0-dev
And then a test file named hello.c is created in a text editor such as Gedit:
Code:
#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 ();
    
    return 0;
}
Which is compiled using (notice how pkg-config is used to compile):
Code:
gcc -Wall -g -o hello hello.c `pkg-config --cflags --libs gtk+-2.0`
Next, you can run your application (a blank window) and use CTRL+C to kill it since we didn't write code to handle terminating the application:

Code:
./hello
 
Old 12-26-2007, 03:59 PM   #5
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
Oh, and by the way, you should be using glade3 not just glade.
Code:
sudo aptitude install glade-3
I have a tutorial on using Glade3: GTK+ and Glade3 GUI Programming Tutorial - Part 1

However, this is before writing any code using C or Python or any other language. For a simple example using C, check out: Very, very simple example using libglade
 
  


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
Problems with Ubuntu. gregf50 Linux - Laptop and Netbook 1 05-12-2005 07:44 AM
Some problems with Ubuntu... Cliekid Ubuntu 6 05-11-2005 06:11 PM
Glade 2.5.0 and Perl-Glade-Two - a little help please Lake-end Programming 1 03-07-2005 04:47 AM
Problems of install Glade-2 in MDK10.1 frank28_nfls Mandriva 5 03-01-2005 02:19 PM
glade problems with autogen.sh tamtam Programming 5 07-29-2004 06:57 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration