Hi Ron,
The original rendition compiles on Windows ok if the compiler being used is
gcc. (I think you said you had tested it on ActivePerl 5.24.0 and found it
to be fine.)
However, with my MS compiler (Microsoft (R) C/C++ Optimizing Compiler
Version 14.00.40310.41 for AMD64), I got:
########################################
C:\_32\pscrpt\inline>perl
try.pl
Microsoft (R) Program Maintenance Utility Version 7.00.8882
Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
Running Mkbootstrap for try_pl_7dcf ()
"C:\_64\ap1600\bin\perl.exe" -MExtUtils::Command -e chmod -- 644
"try_pl
_
7dcf.bs"
"C:\_64\ap1600\bin\perl.exe"
C:\_64\ap1600\lib\ExtUtils\xsubpp" -typem
ap "C:\_64\ap1600\lib\ExtUtils\typemap" -typemap
"C:\_32\pscrpt\inline\typemap"
try_pl_7dcf.xs > try_pl_7dcf.xsc &&
"C:\_64\ap1600\bin\perl.exe" -MExtUtils::Co
mmand -e mv -- try_pl_7dcf.xsc try_pl_7dcf.c
cl -c -I"C:/_32/pscrpt/inline" -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox
-G
L -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTM
ODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DUS
E_PERLIO -std=c99 -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DVERSION=\"0.00\"
-D
XS_VERSION=\"0.00\" "-IC:\_64\ap1600\lib\CORE" try_pl_7dcf.c
cl : Command line warning D9002 : ignoring unknown option '-std=c99'
try_pl_7dcf.c
try_pl_7dcf.xs(14) : error C2143: syntax error : missing ';' before 'type'
try_pl_7dcf.xs(14) : error C2143: syntax error : missing ';' before 'type'
try_pl_7dcf.xs(14) : error C2143: syntax error : missing ')' before 'type'
try_pl_7dcf.xs(14) : error C2143: syntax error : missing ';' before 'type'
try_pl_7dcf.xs(14) : error C2065: 'ix' : undeclared identifier
try_pl_7dcf.xs(14) : warning C4552: '<' : operator has no effect; expected
operator with side-effect
try_pl_7dcf.xs(14) : error C2059: syntax error : ')'
try_pl_7dcf.xs(14) : error C2143: syntax error : missing ';' before '{'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
A problem was encountered while attempting to compile and install your
Inline
C code. The command that failed was:
C:\_64\PLATFO~1\Bin\nmake.exe > out.make 2>&1
The build directory was:
C:\_32\pscrpt\inline\_Inline\build\try_pl_7dcf
To debug the problem, cd to the build directory, and inspect the output
files.
at
try.pl line 0.
...propagated at C:/_64/ap1600/site/lib/Inline/C.pm line 772.
INIT failed--call queue aborted.
########################################
Admittedly, that MS compiler is getting a little bit old but my
understanding is that even the most recent MS compilers are not C99
compliant (as MS like to make up their own rules).
FAIK there might also be other non C99 compliant compilers in use.
Both ActiveState and StrawberryPerl provide gcc-based perls for Windows, but
there are still people using MS compilers with perl on Windows. (I'm not
really one of those people - I keep that MS compiler for reference only.)
So I think, for a cookbook especially, it's best to code for the lowest
common denominator unless that's impractical - though I'm sure that use of
non C99 compliant compilers with perl is the exception rather than the rule.
Cheers,
Rob
-----Original Message-----
From: Ron Grunwald via inline