PerlDiscuss - Perl Newsgroups and mailing lists wrote:
Hello ,

 I am new in using PERLXS facility.

I am trying example 4 of perlxstut on win32(nt4) with Perl 5.8.3 build
from activestate with Mingw32,dmake and FakeConfig


following tutorial guide , here is what i get :
_____________________________________________
D:\Tests\Mytest2>perl -MConfig_m makefile.pl
MakeMaker (v6.17)
Writing Makefile for Mytest2::mylib
Writing Makefile for Mytest2

D:\Tests\Mytest2>dmake
cd mylib && d:\ap\dmake\bin\dmake.exe -S
gcc -c          -g -O2 -DWIN32 -DPERL_IMPLICIT_CONTEXT
-DPERL_MSVCRT_READFIX -g -O2       -DVERSION=\"\"        -DXS_VERSION=\"\"
-DHASATTRIBUTE "-ID:\ap\perl\lib\CORE"   mylib.c
ar cr libmylib.a mylib.o
rem libmylib.a
dmake.exe:  Error -- Don't know how to make `static'
dmake.exe:  Error code 255, while making 'mylib/libmylib.a'
dmake.exe:  'mylib/libmylib.a' removed.


I have a perl built with MinGW and dmake - and I get essentially the same error when running example 4. I think it's a 'dmake' thing.


Example 4 is pretty much how Math::PARI builds - and that module *does* build fine on MinGW/dmake built perl - so a workaround is probably to be found within the Makefile.PL's that ship with the Math::PARI source - if you have the time and energy to search through them. (If you want to build Math::PARI note that you'll also need to download the Pari-GP source.)

You might instead consider putting your efforts into learning how to use Inline::C - which basically autogenerates the XS code for you and then compiles it. There's still a bit to learn - but I found it to be more coherent than XS and it comes with a nice little cookbook (perldoc Inline::C-Cookbook). Of course, without knowing exactly what you're trying to do, it would be wrong to state categorically that Inline::C is what you *should* be using.

Hope there's something helpful in there .... somewhere :-)

Cheers,
Rob



Reply via email to