On Thu, Jan 23, 2003 at 11:45:28PM +0000 mporterfield_528 <[EMAIL PROTECTED]> 
wrote:

> I'm going through the perlxtut and I'm trying to do the first 
> example in the tutorial.  I'm using Perl 5.8.0 the ActiveState 
> distribution on Win XP.  I have VC++ 6.0 installed.  When I try to 
> run nmake I get the following error:
> 
> C:\Documents and Settings\Owner\My Documents\Mytest>nmake
> 
> Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
> Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
> 
>         C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp  -typemap 
> C:\Perl\lib\ExtUtils\typemap  Mytest.xs > Mytest.xsc && 
> C:\Perl\bin\perl.exe -MExtUtils::Command -e mv Mytest.xsc Mytest.c
> Code is not inside a function (maybe last function was ended by a 
> blank line  followed by a statement on column one?) in Mytest.xs, 
> line 8
> NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x1'
> Stop.
> 
> Here's a copy of my Mytest.xs:
> #include "EXTERN.h"
> #include "perl.h"
> #include "XSUB.h"
> 
> #include "ppport.h"
> 
> 
> MODULE = Mytest               PACKAGE = Mytest
>  void
>         hello()
>             CODE:
>                 printf("Hello, world!\n");

XS code is whitespace aware. Change that to:

MODULE = Mytest     PACKAGE = Mytest

void
hello()
    CODE:
        printf("Hello, word!\n");

        

So both the return value of hello() as well as the function name itself
should not be prepended by whitespaces.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval

Reply via email to