Re: does Inline::CPP recognize #import ?

[email protected] (Xiao Yafeng)
Newsgroups perl.inline
Message-ID <CABPUXgBxbiCz5r=4+ZPdDXxdnCU_MgmtdgAxFVCBFCR5LSW+-g@mail.gmail.com>
installed Inline::CPP 0.39, but situation doesn't change:

use strict;
use warnings;
use Inline CPP=>Config=>
    CC                  => 'cl.exe /TP',
        BUILD_NOISY => 1;
use Inline CPP=><<'EOF';
#import "C:\Program Files\Common Files\Microsoft Shared\office11\mso.dll"
rename
("DocumentProperties", "DocumentPropertiesXL") rename("RGB", "RBGXL")
#import "C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\vbe6ext.olb"
#import "C:\Program Files\Microsoft Office\Office11\EXCEL.EXE"
rename("DialogBox
", "DialogBoxXL") rename("RGB", "RBGXL") rename("DocumentProperties",
"DocumentP
ropertiesXL") rename("ReplaceText", "ReplaceTextXL") rename("CopyFile",
"CopyFil
eXL") no_dual_interfaces
using namespace std;

void test(){
;
}
EOF

test();


ERROR messages:

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"  test_cpp_pl_06b1.xs > test_cpp_pl_06b1.xsc &&
C:\Perl\bi
n\perl.exe -MExtUtils::Command -e mv -- test_cpp_pl_06b1.xsc
test_cpp_pl_06b1.c
        cl.exe /TP -c  -I"C:/"  -nologo -GF -W3 -MD -Zi -DNDEBUG -O1
-DWIN32 -D_
CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE
-DPERL_IMPLICIT_CONTEX
T -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T
-DPERL_MSVCRT_READFIX -MD
 -Zi -DNDEBUG -O1    -DVERSION=\"0.00\"  -DXS_VERSION=\"0.00\"
 "-IC:\Perl\lib\C
ORE"   test_cpp_pl_06b1.c
test_cpp_pl_06b1.c
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C
4530: C++ exception handler used, but unwind semantics are not enabled.
Specify
/EHsc
test_cpp_pl_06b1.xs(19) : error C2059: syntax error : '('
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(1479) : error
C205
9: syntax error : '('
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(1479) : error
C223
8: unexpected token(s) preceding ';'
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(7989) : error
C205
9: syntax error : '('
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(7989) : error
C223
8: unexpected token(s) preceding ';'
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(8007) : error
C205
9: syntax error : '('
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(8007) : error
C223
8: unexpected token(s) preceding ';'
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(8010) : error
C205
9: syntax error : '('
c:\program files\microsoft sdks\windows\v6.0a\include\msxml.h(8010) : error
C223
8: unexpected token(s) preceding ';'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(1667) : error
C205
9: syntax error : '('
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(1667) : error
C223
8: unexpected token(s) preceding ';'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(244) :
error C
2059: syntax error : '<L_TYPE_raw>'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(244) :
error C
2238: unexpected token(s) preceding ';'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(547) :
error C
2059: syntax error : '('
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(554) :
error C
2039: 'm_Data' : is not a member of '_bstr_t::Data_t'
        C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\comutil.h(218) :
 see declaration of '_bstr_t::Data_t'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(554) :
error C
2039: 'm_Data' : is not a member of '_bstr_t::Data_t'
        C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\comutil.h(218) :
 see declaration of '_bstr_t::Data_t'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(554) :
error C
2232: '->_bstr_t::Data_t::Length' : left operand has '' type, use '.'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(833) :
error C
2589: '(' : illegal token on right side of '::'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(833) :
error C
2143: syntax error : missing ';' before '::'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(833) :
error C
2059: syntax error : '::'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(834) :
error C
2143: syntax error : missing ';' before '{'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\comutil.h(834) :
error C
2447: '{' : missing function header (old-style formal list?)
c:\_inline\build\test_cpp_pl_06b1\mso.tlh : fatal error C1903: unable to
recover
 from previous error(s); stopping compilation
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

The build directory was:
C:\_Inline\build\test_cpp_pl_06b1

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

 at test_cpp.pl line 26.
BEGIN failed--compilation aborted at test_cpp.pl line 35.












On Mon, Jul 23, 2012 at 8:48 AM, Sisyphus <[email protected]> wrote:

>
> ----- Original Message ----- From: "Xiao Yafeng"
>
>  C:\Perl\cpan\build\Inline-CPP-**0.31-FhHfET>nmake test
>>
>
> Try the latest version of Inline-CPP. It will hopefully detect that
> iostream.h is not present and set things up so that iostream is used
> instead.
>
> Cheers,
> Rob
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.