Errors involving failure to bind usually mean that the XS compiler doesn't know how to handle conversions between perl and the C type that the inline function returns and/or takes as its argument(s).
This can be remedied by providing an appropriate typemap - or by maybe providing some 'wrapper code' that uses only those C types with which the XS compiler is already familiar (if that's viable).
Yeah, I figured it out after a few hours of pulling my hair out. ^_^ Any subroutine that was passing a TIFF * either way failed to bind. I worked around it by writing slightly larger subroutines that kept the TIFF handling internal.
That's always been my approach, too - though with a typemap there's some scope for reducing the overhead of SV*-TIFF* conversions. With a typemap you're functions won't have to perform that conversion, but whether that's much of a saving depends upon what your functions are doing and how many times they're being called.
There's not much goes into a typemap - the tricky bit (it's a complete mystery to me) is working out what it should look like :-)
Cheers, Rob
--
Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.