Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

i cant install modules with .xs files (with activeperl on win32). all the documentation ive seen tells me to run nmake in the directory with the xs file, but when i do i get this error:
Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. NMAKE : fatal error U1081: '0' : program not found Stop.
i also tried using a prog called make.exe that came with my c++ compiler (Dev-C++ 4 by bloodshed software), but that doesnt work either...so, how do i do this? keep in mind i have little to no experience with makefile or unix or c or c++ stuff....im a beginner, so go slow please

Replies are listed 'Best First'.
Re: modules with xs files?
by Corion (Patriarch) on Nov 05, 2001 at 13:00 UTC

    From what my limited knowledge of XS and compilers tells me, you have to (more or less) use the same compiler for XS modules that you used to compile your version of Perl. In your case you use the ActiveState Perl build, which is built with Microsoft VC, so you can't use a gcc version like Dev-C++. You will have to buy and install Microsoft VC unless ActiveState already has built a binary of the module in question (ppm can install that binary in one go).

    If you choose to use the cygwin Perl build (not a really smart idea IMO), you should in theory be able to build the extensions with any gcc compiler, but you will most likely lose all access to Win32 specific modules.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
Re: modules with xs files?
by mandog (Curate) on Nov 05, 2001 at 11:20 UTC
    You might have better luck with ActiveState's PPM command.

    Type ppm at any command prompt.

    Once you have a  PPM> prompt type help

    If you want to compile modules that are not available with ppm, you might try setting the environment variables that NMAKE and VC++ require.

    Do a search for  *var*.bat in your Visual C directory. You'll probably come up with something like VCVARS32.BAT. Run that batch file

    Hope this helps.

    Let us know how it turns out



    email: mandog

Re: modules with xs files?
by pileswasp (Monk) on Nov 05, 2001 at 12:31 UTC
    In case you're after something that's not in the ppm yet, there's also the Make.pm module (which'll give you the pmake program) - though I don't know how buggy or otherwise that may be under Windows as it's a bit *nix-centric - and, of course, the ever faithful Cygwin which includes a version of make and almost anything else you might care to mention.