----- Original Message -----
From: prashanth paramanandan
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"
MODULE = newext PACKAGE = newext
void
hello()
CODE:
printf("Hello world");
-------------------------------
No problems for me - except for the inclusion of ppport.h which I never
use. Here's a very basic distro:
C:\_32\temporary>type newext.pm
package newext;
require DynaLoader;
@ISA = qw(DynaLoader);
$VERSION = 0.5;
bootstrap newext $VERSION;
1;
C:\_32\temporary>type newext.xs
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
MODULE = newext PACKAGE = newext
void
hello()
CODE:
printf("Hello, world!\n");
C:\_32\temporary>type Makefile.PL
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'newext',
VERSION_FROM => 'newext.pm',
);
C:\_32\temporary>type test.pl
use warnings;
use newext;
print "1..2\n";
newext::hello();
print "ok 1 - we got to here so the call to hello() must have worked\n";
if($newext::VERSION == 0.5) {print "ok 2\n"}
else {print "not ok 2\n"}
C:\_32\temporary>perl Makefile.PL
Writing Makefile for newext
C:\_32\temporary>dmake test
cp newext.pm blib\lib\newext.pm
C:\perl58_M\bin\perl.exe C:\perl58_M\lib\ExtUtils\xsubpp -typemap
C:\perl58_M\l
ib\ExtUtils\typemap newext.xs > newext.xsc &&
C:\perl58_M\bin\perl.exe -MExtUti
ls::Command -e mv newext.xsc newext.c
Please specify prototyping behavior for newext.xs (see perlxs manual)
gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_
IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.
5\" -DXS_VERSION=\"0.5\" "-IC:\perl58_M\lib\CORE" newext.c
Running Mkbootstrap for newext ()
C:\perl58_M\bin\perl.exe -MExtUtils::Command -e chmod 644 newext.bs
C:\perl58_M\bin\perl.exe -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"newext\", 'DLBASE' => 'newext', 'DL_FUNCS' =>
{ }
, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
dlltool --def newext.def --output-exp dll.exp
g++ -o
blib\arch\auto\newext\newext.dll -Wl,--base-file -Wl,dll.base -mdll -s -L
"c:\perl58_M\lib\CORE" -L"C:\MinGW\lib" newext.o -Wl,--image-base,0x16110000
C:
\perl58_M\lib\CORE\libperl58.a -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32
-
lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-
lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 dll.exp
dlltool --def newext.def --base-file dll.base --output-exp dll.exp
g++ -o
blib\arch\auto\newext\newext.dll -mdll -s -L"c:\perl58_M\lib\CORE" -L"C:\
MinGW\lib" newext.o -Wl,--image-base,0x16110000
C:\perl58_M\lib\CORE\libperl58.
a -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi
32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversi
on -lodbc32 -lodbccp32 dll.exp
C:\perl58_M\bin\perl.exe -MExtUtils::Command -e chmod 755
blib\arch\auto\newext\
newext.dll
C:\perl58_M\bin\perl.exe -MExtUtils::Command -e cp newext.bs
blib\arch\auto\newe
xt\newext.bs
C:\perl58_M\bin\perl.exe -MExtUtils::Command -e chmod 644
blib\arch\auto\newext\
newext.bs
C:\perl58_M\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
1..2
Hello, world!
ok 1 - we got to here so the call to hello() must have worked
ok 2
I would think the same files as I used should be ok for you. (You should
probably check.)
Did you *really* build perl from source using Visual Studio 8.0. (Afaik it
has not been done before.)
Cheers,
Rob
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs