Re: Perl bindings for libchamplain




On Mar 4, 2009, at 3:11 AM, Emmanuel Rodriguez wrote:

I'm trying to write the Perl bindings for libchamplain
(http://blog.pierlux.com/projects/libchamplain/en/) and I'm struggling
with a simple enum. The C library defines the enum "ChamplainViewMode"
which I have added to my map file. I'm able to generate the XS code
and to compile the module to a .so but when I try to load the Perl
module in a sample file I get:

perl: symbol lookup error:
blib/arch/auto/Clutter/Ex/Champlain/Champlain.so: undefined symbol:
SvChamplainViewMode

The maps file assumes you want to generate all these macros for each thing in the maps file.

If the C library does not define a GType for this enum, then either

1.  remove it from the maps file
2.  provide your own conversion function with this name
3.  provide your own GType mapping

Which one you use depends on how the enum is used. If it's used as an object property, the C library really ought to have the GType.


--
Well done, Android. Aperture Science reminds you that Android Hell is a real place, and you will be sent there at the first sign of defiance.
   -- GlaDOS




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