multiple installs of gtk (1.2 and 2.0)



For some time ago I mailed about problems when have multiple installs of
Gtk/glib.

sometimes it will compile with wrong version even if you included
-I/usr/local/include/gtk-2-0
This is because some other librarys adds -I/usr/local/include and the compiler
reads 
/usr/local/include before /usr/local/include/gtk-2-0 and finds the old gtk.h 

My suggestion was to move the old gtk to a subdirectory
$PREFIX/include/gtk-1-2

the same way as gtk-2-0.

This shouldn't break dependies atleast for those who is using
gtk-config/gnome-config :-)
We just need to change gtk-config script to point to $PREFIX/include/gtk-1-2
instead of
just $PREFIX/include and don't forget to remove the old $PREFIX/include/gtk/
directory.

This means the header files will be in:

$PREFIX/include/gtk-2-0/gtk/      /* gtk 2.0
$PREFIX/include/gtk-1-2/gtk/      /* gtk 1.2
 
instead of:

$PREFIX/include/gtk-2-0/gtk/         /* gtk 2.0      
$PREFIX/include/gtk/                      /* gtk1.2

and the config returns

gtk-config --cflags=-I$PREFIX/include/gtk-1-2
gtk-config-2-0 --cflags=-I$PREFIX/include/gtk-2-0

and the user still do #include <gtk/gtk.h>


same should go for glib.

Will this suggestion(or similar) be implemented for upcoming release of Gtk+
(1.2.9?)

Because if this is not fixed there will be problems in the future.

Greats

Mikael Hermansson






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]