Code Comments
Programming Forum and web based access to our favorite programming groups.hey all.. I was trying to build Inline:CPP on win32 using visualc++ version 6, and got the following error in testing: C:\visualc\VC98\INCLUDE\math.h(514) : error C2894: templates cannot be declared to have 'C' linkage NMAKE: fatal error U1077: 'cl' return code '0x2'. I was wondering if this was a known bug (version .25 of Inline::CPP, because it is a fatal error in using Inline::CPP on that platform.. Ed
Post Follow-up to this message# from Edward Peschko # on Saturday 29 March 2008 11:41: >I was trying to build Inline:CPP on win32 using visualc++ version 6, > and got the following error in testing... Hmm. http://rt.cpan.org/Public/Dist/Disp...Name=Inline-CPP --Eric -- You can't whack a chisel without a big wooden mallet. --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------
Post Follow-up to this messageI 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? Ed On Sat, Mar 29, 2008 at 11:59 AM, Eric Wilhelm <scratchcomputing@gmail.com> wrote: > # from Edward Peschko > # on Saturday 29 March 2008 11:41: > > > Hmm. > > http://rt.cpan.org/Public/Dist/Disp...Name=Inline-CPP > > --Eric > -- > You can't whack a chisel without a big wooden mallet. > --------------------------------------------------- > http://scratchcomputing.com > --------------------------------------------------- >
Post Follow-up to this message
----- Original Message -----
From: "Edward Peschko" <horos11@gmail.com>
To: "Eric Wilhelm" <scratchcomputing@gmail.com>; <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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.