Re: Best way to compile with CPAN Glib?



Thanks.  One followup question:

As I understand it, the runtime version will always be greater than or equal to the compiled version, so that if I ensure that I compiled with GNU glib >= 2.22.0, I also ensure that my runtime is >= 2.22.0.  Reading your man page, it says that the check of the runtime version is only for special cases, such as an incompatibility with one particular major-minor-micro number -- that is, for cases where testing for "greater than or equal to X.Y.Z" does not suffice to ensure compatibility.  As you say in the man page, those cases are rare and fortunately mine is not one of them.

Thanks, jeffrey kegler

On Sun, Mar 18, 2012 at 5:30 AM, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 14.03.2012 17:39, Jeffrey Kegler wrote:
What is the correct, supported way for me to get the information to
compile my XS code with Glib?  Should I be getting the compile and load
arguments/flags from ExtUtils::Depends?

Using ExtUtils::Depends should work fine, yes.  But if you don't actually use any of the Perl bindings that CPAN Glib provides, then you could also use ExtUtils::PkgConfig directly to find the necessary information about C glib, like CPAN Glib does in its Makefile.PL.


Also, I need to ensure that the version of GNU glib is greater than
or equal to 2.22.0.  Is Glib->CHECK_VERSION( 2, 22, 0 ) the right way
to do this?

This function is a thin wrapper around the GLIB_CHECK_VERSION macro, which checks against the compile-time version.  But if you need to ensure that you are actually running with a glib >= 2.22.0, then check against Glib::major_version, Glib::minor_version and Glib::micro_version as described in `perldoc Glib::version`.  (Unfortunately, we don't seem to wrap glib_check_version yet).
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list



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