A. Sinan Unur said:
So? You can always download the source, and try to install from source.
I am going to show you the process, so you can better diagnose problems
the next time.
Thanks very much for your help.
I have *almost* completed my installation of Inline::CPP:
At first I failed on the test (math.h(514) : error C2894: templates
cannot be declared to have 'C' linkage)
which I could fix by removing the EXTERN "C" directive in "CPP.pm"
but then I am failing on the last of the 16 tests
(16varlst_t_44e4.xs(31) : error C2258: illegal pure syntax, must be '=
0').
I don't know how to fix this.
Can you help ?
Here is a transcript of my installation procedure:
===================
for information:
before installing "Inline::CPP", I had to install "Parse::RecDescent"
(Parse-RecDescent-1.94.zip) and "Inline::C" (Inline-0.44.zip) directly
from the Activestate website.
"Parse-RecDescent-1.94.zip" installed just fine, but "Inline-0.44.zip"
was really, really nasty to install, I had to go to
"ExtUtils::MakeMaker-Hell" and back, but that's another story/post.
====================
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for
80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25>perl Makefile.PL
This will configure and build Inline::C++.
What default C++ compiler would you like to use? [cl -TP] cl -TP -ML
What default libraries would you like to include? [MSVCIRT.LIB]
LIBC.LIB
Checking if your kit is complete...
Looks good
Writing Makefile for Inline::CPP::grammar
Writing Makefile for Inline::CPP
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25>nmake -f Makefile
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cp CPP.pm blib\lib\Inline\CPP.pm
cp lib/Inline/CPP.pod blib\lib\Inline\CPP.pod
cp grammar.pm ..\blib\lib\Inline\CPP\grammar.pm
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25>nmake -f Makefile test
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t\01basic.t t\02prefix.t
t\01basic.....
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp -typemap
C:\Perl\lib\ExtUtils\typemap -typemap C:\DosExt\Perl-Mod-Playgrou
nd\Inline-CPP-0.25\_Inline\build\_01basic_t_5cd2\CPP.map
_01basic_t_5cd2.xs > _01basic_t_5cd2.xsc && C:\Perl\bin\perl.exe
-MExtUtil
s::Command -e mv _01basic_t_5cd2.xsc _01basic_t_5cd2.c
cl -TP -ML -c
-IC:/DosExt/Perl-Mod-Playground/Inline-CPP-0.25/t -nologo -Gf -W3 -MD
-Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -D
NO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCR
T_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\" "-IC:\Perl\lib\CORE" _01basic_t_5cd2.c
Command line warning D4025 : overriding '/ML' with '/MD'
_01basic_t_5cd2.c
C:\Program Files\Microsoft Visual Studio\VC98\include\math.h(514) :
error C2894: templates cannot be declared to have 'C' linkage
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
A problem was encountered while attempting to compile and install your
Inline
CPP code. The command that failed was:
nmake > out.make 2>&1
The build directory was:
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25\_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.....dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-10
Failed 10/10 tests, 0.00% okay
t\02prefix....
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp -typemap
C:\Perl\lib\ExtUtils\typemap -typemap C:\DosExt\Perl-Mod-Playgrou
nd\Inline-CPP-0.25\_Inline\build\_02prefix_t_4ede\CPP.map
_02prefix_t_4ede.xs > _02prefix_t_4ede.xsc && C:\Perl\bin\perl.exe
-MExtU
tils::Command -e mv _02prefix_t_4ede.xsc _02prefix_t_4ede.c
cl -TP -ML -c
-IC:/DosExt/Perl-Mod-Playground/Inline-CPP-0.25/t -nologo -Gf -W3 -MD
-Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -D
NO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCR
T_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\" "-IC:\Perl\lib\CORE" _02prefix_t_4ede.c
Command line warning D4025 : overriding '/ML' with '/MD'
_02prefix_t_4ede.c
C:\Program Files\Microsoft Visual Studio\VC98\include\math.h(514) :
error C2894: templates cannot be declared to have 'C' linkage
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
A problem was encountered while attempting to compile and install your
Inline
CPP code. The command that failed was:
nmake > out.make 2>&1
The build directory was:
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25\_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....dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-4
Failed 4/4 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t\01basic.t 2 512 10 20 200.00% 1-10
t\02prefix.t 2 512 4 8 200.00% 1-4
Failed 2/2 test scripts, 0.00% okay. 14/14 subtests failed, 0.00% okay.
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2'
Stop.
*************************************************************************************
I could see the problem in
C:\Program Files\Microsoft Visual Studio\VC98\include\math.h(514) :
error C2894: templates cannot be declared to have 'C' linkage
....and I promptly removed the EXTERN "C" directive in "CPP.pm".
I re-tested:
*************************************************************************************
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25>nmake -f Makefile test
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cp CPP.pm blib\lib\Inline\CPP.pm
Skip blib\lib\Inline\CPP.pod (unchanged)
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t\01basic.t t\02prefix.t
t\01basic.....ok
t\02prefix....ok
All tests successful.
Files=2, Tests=14, 14 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00
CPU)
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, '..\blib\lib', '..\blib\arch')" t\01nherit.t
t\02scope.
t t\03inline.t t\04const.t t\05virt.t t\06deflt.t t\07static.t
t\08anon.t t\09purevt.t t\10struct.t t\11minhrt.t t\12retlst.t t\13va
rarg.t t\14const.t t\15stvar.t t\16varlst.t
t\01nherit....ok
t\02scope.....ok
t\03inline....ok
t\04const.....ok
t\05virt......ok
t\06deflt.....ok
t\07static....ok
t\08anon......ok
t\09purevt....ok
t\10struct....ok
t\11minhrt....ok
t\12retlst....ok
t\13vararg....ok
t\14const.....ok
t\15stvar.....ok
t\16varlst....
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp -typemap
C:\Perl\lib\ExtUtils\typemap -typemap C:\DosExt\Perl-Mod-Playgrou
nd\Inline-CPP-0.25\grammar\_Inline\build\_16varlst_t_44e4\CPP.map
_16varlst_t_44e4.xs > _16varlst_t_44e4.xsc && C:\Perl\bin\perl.ex
e -MExtUtils::Command -e mv _16varlst_t_44e4.xsc _16varlst_t_44e4.c
cl -TP -ML -c
-IC:/DosExt/Perl-Mod-Playground/Inline-CPP-0.25/grammar/t -nologo -Gf
-W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CO
NSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPE
RL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\" "-IC:\Perl\lib\CORE" _16varlst_t_44e4.c
Command line warning D4025 : overriding '/ML' with '/MD'
_16varlst_t_44e4.c
_16varlst_t_44e4.xs(31) : error C2258: illegal pure syntax, must be '=
0'
_16varlst_t_44e4.xs(31) : error C2252: 'aa' : pure specifier can only
be specified for functions
_16varlst_t_44e4.xs(32) : error C2258: illegal pure syntax, must be '=
0'
_16varlst_t_44e4.xs(32) : error C2252: 'bb' : pure specifier can only
be specified for functions
_16varlst_t_44e4.xs(33) : error C2258: illegal pure syntax, must be '=
0'
_16varlst_t_44e4.xs(33) : error C2252: 'cc' : pure specifier can only
be specified for functions
_16varlst_t_44e4.xs(35) : error C2258: illegal pure syntax, must be '=
0'
_16varlst_t_44e4.xs(35) : error C2252: 'dd' : pure specifier can only
be specified for functions
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
A problem was encountered while attempting to compile and install your
Inline
CPP code. The command that failed was:
nmake > out.make 2>&1
The build directory was:
C:\DosExt\Perl-Mod-Playground\Inline-CPP-0.25\grammar\_Inline\build\_16varlst_t_44e4
To debug the problem, cd to the build directory, and inspect the output
files.
at t\16varlst.t line 4
BEGIN failed--compilation aborted at t\16varlst.t line 35.
t\16varlst....dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t\16varlst.t 2 512 2 4 200.00% 1-2
Failed 1/16 test scripts, 93.75% okay. 2/34 subtests failed, 94.12%
okay.
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
*************************************************************************************
I am failing on the last of the 16 tests (16varlst_t_44e4.xs(31) :
error C2258: illegal pure syntax, must be '= 0').
Can you help ?