On 10/14/2011 08:18 AM, Jeffrey Ratcliffe wrote:
I'm getting this error wrapping a C++ library:

Group.c: In function 'void XS_Foo__Group_new(PerlInterpreter*, CV*)':
Group.c:84: error: reference to 'group' is ambiguous
/usr/include/grp.h:44: error: candidates are: struct group
group.h:41: error:                 class foo::group

/usr/include/grp.h is pulled in perl.h, so obviously compiling with
-nostdlib is no possible.

If I try to make the type unambiguous by specifying foo::group in the
..xs, then I get typemap problems, which get worse if I include foo::
in group in the typemap as well.

Any suggestions?

You can get this to work with typemaps. Have a look at how Mike Sheldrake solved this same problem (different symbol; Polygon on win32) for Math::Clipper. Should have been a few weeks/months ago.

Source repository at https://github.com/tsee/Math-Clipper

Best regards,
Steffen

Reply via email to