Thanks for your helps, Rob!
I've tried to reinstall Inline::CPP with cl /TP but can't pass test. here
is the steps:

open a VS command prompt to be sure ENV settings is correct.
perl Makefile.PL
This will configure and build Inline::C++.
What default C++ compiler would you like to use? [cl -TP] cl /TP
What default libraries would you like to include? [MSVCIRT.LIB]
Writing Makefile for Inline::CPP::grammar
Writing MYMETA.yml and MYMETA.json
Writing Makefile for Inline::CPP
Writing MYMETA.yml and MYMETA.json
C:\Perl\cpan\build\Inline-CPP-0.31-FhHfET>
C:\Perl\cpan\build\Inline-CPP-0.31-FhHfET>nmake

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

cp CPP.pm blib\lib\Inline\CPP.pm
cp lib/Inline/CPP.pod blib\lib\Inline\CPP.pod
        C:\PROGRA~1\MICROS~1.0\VC\BIN\nmake.exe -f Makefile all -nologo
cp grammar.pm ..\blib\lib\Inline\CPP\grammar.pm
        cd ..

C:\Perl\cpan\build\Inline-CPP-0.31-FhHfET>nmake test

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        C:\PROGRA~1\MICROS~1.0\VC\BIN\nmake.exe -f Makefile all -nologo
        cd ..
        C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'bl
ib\lib', 'blib\arch')" t/*.t
t/01basic.t ...
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        C:\Perl\bin\perl.exe C:\Perl\site\lib\ExtUtils\xsubpp  -typemap
"C:\Perl
\lib\ExtUtils\typemap" -typemap
"C:\Perl\cpan\build\Inline-CPP-0.31-FhHfET\_Inli
ne\build\_01basic_t_5cd2\CPP.map"  _01basic_t_5cd2.xs > _01basic_t_5cd2.xsc
&& C
:\Perl\bin\perl.exe -MExtUtils::Command -e mv -- _01basic_t_5cd2.xsc
_01basic_t_
5cd2.c
        cl /TP -c  -I"C:/Perl/cpan/build/Inline-CPP-0.31-FhHfET/t"  -nologo
-GF
-W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT
-DUSE_
SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-D_USE_32
BIT_TIME_T -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1    -DVERSION=\"0.00\"
 -DX
S_VERSION=\"0.00\"  "-IC:\Perl\lib\CORE"   _01basic_t_5cd2.c
_01basic_t_5cd2.c
_01basic_t_5cd2.xs(2) : fatal error C1083: Cannot open include file:
'iostream.h
': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.

A problem was encountered while attempting to compile and install your
Inline
CPP code. The command that failed was:
  C:\PROGRA~1\MICROS~1.0\VC\BIN\nmake.exe > out.make 2>&1

The build directory was:
C:\Perl\cpan\build\Inline-CPP-0.31-FhHfET\_Inline\build\_01basic_t_5cd2

To debug the problem, cd to the build directory, and inspect the output
files.

 at t/01basic.t line 30.
BEGIN failed--compilation aborted at t/01basic.t line 64.
t/01basic.t ... Dubious, test returned 2 (wstat 512, 0x200)
Failed 10/10 subtests
t/02prefix.t ..
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        C:\Perl\bin\perl.exe C:\Perl\site\lib\ExtUtils\xsubpp  -typemap
"C:\Perl
\lib\ExtUtils\typemap" -typemap
"C:\Perl\cpan\build\Inline-CPP-0.31-FhHfET\_Inli
ne\build\_02prefix_t_4ede\CPP.map"  _02prefix_t_4ede.xs >
_02prefix_t_4ede.xsc &
& C:\Perl\bin\perl.exe -MExtUtils::Command -e mv -- _02prefix_t_4ede.xsc
_02pref
ix_t_4ede.c
        cl /TP -c  -I"C:/Perl/cpan/build/Inline-CPP-0.31-FhHfET/t"  -nologo
-GF
-W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT
-DUSE_
SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-D_USE_32
BIT_TIME_T -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1    -DVERSION=\"0.00\"
 -DX
S_VERSION=\"0.00\"  "-IC:\Perl\lib\CORE"   _02prefix_t_4ede.c
_02prefix_t_4ede.c
_02prefix_t_4ede.xs(2) : fatal error C1083: Cannot open include file:
'iostream.
h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.

A problem was encountered while attempting to compile and install your
Inline
CPP code. The command that failed was:
  C:\PROGRA~1\MICROS~1.0\VC\BIN\nmake.exe > out.make 2>&1

The build directory was:
C:\Perl\cpan\build\Inline-CPP-0.31-FhHfET\_Inline\build\_02prefix_t_4ede

To debug the problem, cd to the build directory, and inspect the output
files.

 at t/02prefix.t line 0.
INIT failed--call queue aborted.
t/02prefix.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/4 subtests

Test Summary Report
-------------------
t/01basic.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 10 tests but ran 0.
t/02prefix.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 4 tests but ran 0.
Files=2, Tests=0,  7 wallclock secs ( 0.03 usr +  0.03 sys =  0.06 CPU)
Result: FAIL
Failed 2/2 test programs. 0/0 subtests failed.
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2'
Stop.

IIRC  checking iostream.h is an old bug and fixed in new inline::CPP?  or
was I missing something?


BTW. I'm using active perl with MinGW.













On Sun, Jul 22, 2012 at 10:27 PM, Sisyphus <sisyph...@optusnet.com.au>wrote:

>
> ----- Original Message ----- From: "Xiao Yafeng" <xyf.x...@gmail.com>
> To: "inline" <inline@perl.org>; "David Oswald" <daosw...@gmail.com>
> Sent: Sunday, July 22, 2012 9:28 PM
> Subject: does Inline::CPP recognize #import ?
>
>
>
>  I have to use #import to import typed library , but seems Inline::CPP
>> doesn't know this and complain many errors:
>>
>> use Inline CPP=>Config=>
>>    CC => 'cl.exe',
>> BUILD_NOISY => 1;
>>
>
> If you want to use cl.exe as a C++ compiler, you'll need to do
>  CC => 'cl /TP',
>
> otherwise the source files will be treated as C files.
>
> Was Inline::CPP originally installed using a different "CC" ?
> If so, then it might cause problems if you decide to switch to cl.exe. (Or
> it may not ... I don't know.)
>
> If I wanted to switch to another compiler then, instead of using the 'CC'
> config option, I would re-build and re-install Inline::CPP using that other
> compiler. (But make sure you specify 'cl /TP' as the compiler.)
> If you're using ActivePerl, you might just get away with that ... but if
> you're running Strawberry Perl, then switching to a Microsoft compiler
> might cause problems.
>
>
>  test_cpp_pl_57db.c
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(39) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(39) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(41) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(41) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(41) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(41) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(41) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(41) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(42) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(42) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(42) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(42) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(42) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(42) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(43) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(43) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(43) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(43) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(43) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(43) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(44) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(44) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(44) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(44) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(44) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(44) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(45) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(45) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(45) : error
>> C2143
>> : syntax error : missing '{' before ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(45) : error
>> C2059
>> : syntax error : ':'
>> C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\cstdio(45) : error
>> C2143
>> : syntax error : missing '{' before ':'
>>
>
> Note that this is Visual Studio complaining about its own cstdio file -
> which also probably indicates that this C++ file (cstdio) is being parsed
> as a C file.
>
> Cheers,
> Rob
>

Reply via email to