Tuesday, September 9, 2008

mmm troubles using GTK+ on UBUNTU 8.04

mmmm ok guys, I started to use the GTK+ libraries to develop a C application on my GNOME platform running on UBUNTU 8.0.4.


I have started the installation process.

As you know, it is composed of 3 different steps.
The first one, the creation of the Makefile:

./configure

and....up until here everything was ok.

The second one, the compile of the source files:

make


Ok, after several steps I got the following errors:

======================================================+
mkdir .libs
gcc -g -O2 -Wall -o .libs/autotestfilechooser autotestfilechooser.o ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so -L/usr/local/lib ../gdk/.libs/libgdk-x11-2.0.so ../gtk/.libs/libgtk-x11-2.0.so /home//gtk+-2.12.6/gdk/.libs/libgdk-x11-2.0.so -lXext /home//gtk+-2.12.6/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so /usr/local/lib/libpangocairo-1.0.so /usr/local/lib/libpangoft2-1.0.so /usr/local/lib/libpango-1.0.so /usr/local/lib/libatk-1.0.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libgmodule-2.0.so -ldl /usr/local/lib/libglib-2.0.so /usr/lib/libcairo.so /usr/local/lib/libfreetype.so -lz -lfontconfig -lpng12 -lXrender -lX11 -lm
creating autotestfilechooser
/bin/bash ../libtool --mode=link -o autotestkeywords
libtool: unrecognized option `-o'
Try `libtool --help' for more information.
make[2]: *** [autotestkeywords] Error 1
make[2]: Leaving directory `/home//gtk+-2.12.6/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home//gtk+-2.12.6'
make: *** [all] Error 2

======================================================+


mmmm, now, I tried different solutions:

- Upgrade the version of the libtool system to the lastest version.
- Review the generated Makefile
- Review all the installed libraries.


After several checks and hours spent googling for a solution, I found that a temporary workaround to the problem is to disable the compiling of the tests projects stored under the test folder.

To do this, open the generated MakeFile (from a shell you can you whatever program you prefer, vi, gedit or what you prefer).

Go to the line starting with SRC_SUBDIRS and remove the word tests.

from:

SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib

to:

SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos perf contrib


Start again with the make of the project! that's all!

Enjoy your GTK+ programming experience!

No comments: