It took a bit of a break from xs for (been pythonging among other things),
I took some advice from Mattia,
and got it to compile by adding
DEFINE => ' -TP ',
instead of
CCFLAGS => '-TP',
along with moving the c++ includes before the perl includes
#include <stdio.h>
#include <iostream.h>
#include <stdlib.h>
and adding
#include <math.h>
to the list.
Here's how it goes:
E:\dev\XS\ExtEmbPerlSrc_v0_90\chap6\6.8.1>perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Coordinate
E:\dev\XS\ExtEmbPerlSrc_v0_90\chap6\6.8.1>nmake
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cp PerlCoordinate.pm blib\lib\PerlCoordinate.pm
cp Coordinate.pm blib\lib\Coordinate.pm
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp -typemap C:\
+Perl\lib\ExtUtils\typemap -typemap typemap Coordinate.xs > Coordinat
+e
.xsc && C:\Perl\bin\perl.exe -MExtUtils::Command -e mv Coordinate.xsc
+Coordinate.c
Please specify prototyping behavior for Coordinate.xs (see perlxs manu
+al)
cl -c -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRI
+CT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPE
+R
L_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"0.01\" -DXS_VERSION=
+\"0.01\" "-IC:\Perl\lib\CORE" -TP Coordinate.c
Coordinate.c
Running Mkbootstrap for Coordinate ()
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Coordina
+te.bs
C:\Perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('N
+AME'=>\"Coordinate\", 'DLBASE' => 'Coordinate', 'DL_FUNCS' => { }, '
+F
UNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
link -out:blib\arch\auto\Coordinate\Coordinate.dll -dll -nolog
+o -nodefaultlib -release -libpath:"C:/Perl\lib\CORE" -machine:x86 C
+o
ordinate.obj C:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib u
+ser32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.l
+i
b ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib wi
+nmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib -def:Coordina
+t
e.def
Creating library blib\arch\auto\Coordinate\Coordinate.lib and objec
+t blib\arch\auto\Coordinate\Coordinate.exp
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755 blib\arc
+h\auto\Coordinate\Coordinate.dll
C:\Perl\bin\perl.exe -MExtUtils::Command -e cp Coordinate.bs b
+lib\arch\auto\Coordinate\Coordinate.bs
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 blib\arc
+h\auto\Coordinate\Coordinate.bs
E:\dev\XS\ExtEmbPerlSrc_v0_90\chap6\6.8.1>nmake test
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\Perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
1..6
# Running under perl version 5.006001 for MSWin32
# Win32::BuildNumber 633
# Current time local: Mon Jul 14 10:10:26 2003
# Current time GMT: Mon Jul 14 17:10:26 2003
# Using Test.pm version 1.24
# C is CoordinatePtr=SCALAR(0x1abf138)
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
E:\dev\XS\ExtEmbPerlSrc_v0_90\chap6\6.8.1>
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" |
| I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). |
| ** The third rule of perl club is a statement of fact: pod is sexy. |