Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Inline::CPP on win32 bug
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


Report this thread to moderator Post Follow-up to this message
Old Post
Edward Peschko
03-30-08 01:27 AM


Re: Inline::CPP on win32 bug
# 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
---------------------------------------------------

Report this thread to moderator Post Follow-up to this message
Old Post
Eric Wilhelm
03-30-08 01:27 AM


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?

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
> ---------------------------------------------------
>


Report this thread to moderator Post Follow-up to this message
Old Post
Edward Peschko
03-30-08 01:27 AM


Re: Inline::CPP on win32 bug
----- 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


Report this thread to moderator Post Follow-up to this message
Old Post
Sisyphus
03-30-08 01:27 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL INLINE module archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:10 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.