Sisyphus
Sat, 29 Mar 2008 18:02:06 -0700
----- Original Message ----- From: "Edward Peschko" <[EMAIL PROTECTED]>
To: "Eric Wilhelm" <[EMAIL PROTECTED]>; <inline@perl.org> Sent: Sunday, March 30, 2008 8:30 AM Subject: Re: Inline::CPP on win32 bug
I think the problem is that "perl.h" is included in an 'extern C' block, which then includes math.h, which has template code. If I comment out the template code in the main header included with vc++( math.h), things seem to work fine. Of course this is totally backwards - would it be possible to move the "perl.h" out of the "extern C" block instead?
Yes, I think so. CPP.pm's sub validate() contains the following:
$o->{ILSM}{AUTO_INCLUDE} ||= <<END;
#ifndef bool
#include <%iostream%>
#endif
extern "C" {
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "INLINE.h"
}
#ifdef bool
#undef bool
#include <%iostream%>
#endif
END
Try rewriting that to suit your needs.
Cheers,
Rob