I am running through the h2xs tutorial, example 4 
(www.perl.com/pub/doc/manual/html/pod/perlxstut.html) which shows how
to write an XSUB to interact with a user-generated library.
However, it fails when nmake tries to build the library.

Due to a previous issue (see my last posting), and thanks to Ian's analysis 
and suggestions, I ended up modifying Config.pm (with backup in place of 
original) to change all occurences of "Program Files" to "Progra~1".  I 
also specified where to find Perl directly in the Makefile, namely adding 
this info as the first line in the file:

PERL => "$^X"

These actions corrected the problem. I mention this because now it seems 
that it might be related to what's occuring now.

When I ran Makefile.PL, here's a warning message that followed:

Using PERL=C:\Progra~1\Perl\bin\perl
Have C:\Program Files\Perl\lib\Config.pm expected 
C:\Progra~1\Perl\lib\Config.pm

Your perl and your Config.pm seem to have different ideas about the 
architecture

they are running on.
Perl thinks: [lib]
Config says: [MSWin32-x86-multi-thread]
This may or may not cause problems. Please check your installation of perl 
if you have problems building this extension.
MakeMaker (v5.45)
Blessing Object into class [PACK002]
Have C:\Program Files\Perl\lib\Config.pm expected 
C:\Progra~1\Perl\lib\Config.pm

Your perl and your Config.pm seem to have different ideas about the 
architecture

they are running on.
Perl thinks: [lib]
Config says: [MSWin32-x86-multi-thread]
Processing Makefile 'post_initialize' section
Processing Makefile 'const_config' section
Processing Makefile 'constants' section
Processing Makefile 'tool_autosplit' section
Processing Makefile 'tool_xsubpp' section
Running C:\Progra~1\Perl\bin\perl -IC:\Progra~1\Perl\lib
C:\Progra~1\Perl\lib\ExtUtils\xsubpp -v 2>&1
Processing Makefile 'tools_other' section

[...and so on ]

It did finish, however, so I ran nmake. The library I'm trying to build is
located in the subdirectory mylib. When I typed "nmake", I got the 
following error when it tried to build the library:

mkdir blib
[and so on down the tree...]
mkdir blib\lib\auto
mkdir \blib\lib\auto\Mytest2
cp Mytest2.pm blib\lib\Mytest2.pm
Autosplitting blib\lib\Mytest2\.pm (blib\lib\auto/Mytest2)
            mylib\libmylib.lib: .. mylib\Makefile
The filename, directory name, or volume label syntax is incorrect.
NMAKE: fatal error U1077: 'mylib\libmylib.lib:' : return code '0x1'
Stop.

Here's the Mytest2/Makefile.PL:

Perl => "$^X";
use ExtUtils::MakeMaker;
$Verbose = 3;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'  => 'Mytest2',
    'VERSION_FROM' => 'Mytest2.pm', # finds $VERSION
    'PREREQ_PM'  => {}, # e.g., Module::Name => 1.1
    'LIBS'  => [''], # e.g., '-lm'
    'DEFINE'  => '', # e.g., '-DHAVE_SOMETHING'
    'INC'  => '', # e.g., '-I/usr/include/other'
    'MYEXTLIB'  => 'mylib\libmylib$(LIB_EXT)',
);
sub MY::postamble {
        '
    $(MYEXTLIB): mylib/Makefile
 cd mylib && $(MAKE) $(PASTHRU)
    ';
    }

When I run the same sequence on UNIX, I get past this point so the issue is 
definitely ActivePerl/NT etc. related. Any suggestions would be 
appreciated. I did play around with specifying the path to the library 
directory directly (C:\...) but that got the same message, just with the 
full path specified. I also checked docs on MakeMaker and Make but 
everything seems to be correct.

Thanks,
Judy

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to