develooper Front page | perl.makemaker | Postings from January 2003

Re: How do I force a .cpp extension for my xs generated files?

Thread Previous
From:
Mattia Barbon
Date:
January 5, 2003 09:29
Subject:
Re: How do I force a .cpp extension for my xs generated files?
Message ID:
Mahogany-0.64.2-332-20030104-205041.00@rbnet.it
On Sat, 4 Jan 2003 02:59:18 -0800 (PST) DH <crazyinsomniac@yahoo.com> wrote:

> How do I force a .cpp extension for my xs generated files?
> 
> The 
> 
>     'XS'        => {'MyPackage.xs' => 'MyPackage.cpp'},
> 
> option for ExtUtils::MakeMaker::WriteMakefile()
> is not working (no cd file gets generated).
> 
> How do I resolve this?
>     'CCFLAGS'   => ' -TP ', # compile as C++, cl.exe specific 
> will work for MSVS, but that's not portable (it'd be easier to have a
> .cpp extension)
  I do not know the answer to your question... just a note, though: having
a .cpp extension msy not be enough, in general (it is for MSVC and gcc),
since perl provides you with a C compiler, and, in general, compiling a C++
file with a C compiler has undefined results (gcc/MSVC try to figure out
the language from the file extension, but there isn't any guarantee other
compilers will do that).

Regards
Mattia






Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About