Re: Gtk2-Perl with private Gtk library?




Peter Daum wrote:
I have a pretty old Gtk2 library installed that I can't upgrade.
Additionally, I have some newer versions installed under a different
prefix path. To run a binary program using a newer gtk library, it is
enough to set LD_LIBRARY_PATH to the desired location (e.g.
LD_LIBRARY_PATH=/opt/gtk2.10/lib gimp)

Is there any way to tell Gtk2-Perl in a similar way to use the
Gtk library installed under a certain path? At least just setting
LD_LIBRARY_PATH obviously doesn't do the job ...

Setting LD_LIBRARY_PATH is the mechanism that makes the bindings run with the
newer libgtk+, so i'd wager it actually *is* working.

However, unless you recompile the bindings to include support for the new
features in the newer gtk+, you won't be able to use them.

The important trick here is that you need to set not only LD_LIBRARY_PATH, so
that you find the new gtk+ libraries, but also PATH, so that you find the new
gtk+ & glib utilities, and PKG_CONFIG_PATH, so that pkg-config finds the
correct information for knowing how to compile against your new gtk+ stack.


You will get good mileage out of creating some scripts to manipulate your
environment, and aliases in your shell to load those environment changes.  I
use this technique to switch among a large number of sandboxes.


-- 
muppet <scott at asofyet dot org>




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