Hello,
I'm attempting to go through the perlxtut in preparation to writing
my own Xsub and I keep running into little problems. My current
dillima is this: I can't get the floor() and ceil() math functions
to work. Here's my Makefile.PL:
(notice LIBS points to -lc which should expand to libc.lib right?)
use 5.008;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Mytest',
'VERSION_FROM' => 'Mytest.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'Mytest.pm', # retrieve abstract from module
AUTHOR => 'A. U. Thor
<[EMAIL PROTECTED]>') : ()),
'LIBS' => ['-lc'], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
'INC' => '-I.', # e.g., '-I. -I/usr/include/other'
# Un-comment this if you add C files to link with later:
# 'OBJECT' => '$(O_FILES)', # link all the C files too
);
nmake of Makefile.PL works fine but here's the result from nmake
test:
C:\Documents and Settings\Owner\My Documents\Mytest>nmake test
TEST_VERBOSE=1
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-
e" "test_harness(1, 'blib\lib', 'blib\arch')" t\1.t
t\1....ok 1 - use Mytest;
# Failed test (t\1.t at line 20)
ok 2 - is_even(0)
ok 3 - is_even(1)
# Failed test (t\1.t at line 22)
# Failed test (t\1.t at line 26)
# Failed test (t\1.t at line 28)
# Looks like you failed 4 tests of 10.
ok 4 - is_even(2)
ok 5 - is_even(5)
not ok 6 - round(-1.5)
not ok 7 - round(-1.1)
ok 8 - round(0.0)
not ok 9 - round(0.5)
not ok 10 - round(1.2)
1..10
dubious
Test returned status 4 (wstat 1024, 0x400)
DIED. FAILED tests 6-7, 9-10
Failed 4/10 tests, 60.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
---------------------------------------------------------------------
----------
t\1.t 4 1024 10 4 40.00% 6-7 9-10
Failed 1/1 test scripts, 0.00% okay. 4/10 subtests failed, 60.00%
okay.
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2'
Stop.
The tests for the example function round() fail where floor() and
ceil() are used. I'm at a loss. Help please.
thanks,
Marcus Porterfield