Subject: | Test failure on Win32 |
Hi Steffen.
Please change the file t\module\CppGuessTest.xs so the following lines:
#include <string>
typedef std::string std__string;
will appear *before* the perl header files declarations.
because in Win32 at least, it pulls in cstdio header file, and it
declare fgets, that is already defined by perl.
it does "using _CSTD fgets;"
anyway, moving the include fixes the problem.
Thanks,
Shmuel.
this is the failed test:
C:\TEMP\ExtUtils-CppGuess-0.04>build test
t\001_load.t .......... ok
t\010_module_build.t .. 1/1
# Failed test 'build with Module::Build'
# at t\010_module_build.t line 12.
# Build.PL output
# ========================================
# compilet-LFSEo.c
# Creating library compilet.lib and object compilet.exp
# ERROR: Missing required field 'dist_abstract' for metafile
# Creating new 'MYMETA.yml' with configuration results
# Creating new 'Build' script for 'CppGuessTest' version '0.01'
# ========================================
# Build output
# ========================================
# Building CppGuessTest
# Generating script 'lib\CppGuessTest.ccs'
# cl -nologo -c @"lib\CppGuessTest.ccs" -Fo"lib\CppGuessTest.obj"
"lib\CppGuessT
est.c"
# CppGuessTest.c
# C:\Perl\lib\CORE\sys/socket.h(34) : warning C4005: 'ENOTSOCK' : macro
redefini
tion
# C:\Program Files\Microsoft Visual Studio
10.0\VC\INCLUDE\errno.h(120)
: see previous definition of 'ENOTSOCK'
# C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\cstdio(43) :
error C2
039: 'PerlSIO_fgets' : is not a member of '`global namespace''
# C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\cstdio(43) :
error C2
873: 'PerlSIO_fgets' : symbol cannot be used in a using-declaration
# error building dll file from 'lib\CppGuessTest.c' at
C:/Perl/lib/ExtUtils/CBui
lder/Platform/Windows.pm line 130.
# ========================================
# Looks like you failed 1 test of 1.
t\010_module_build.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t\011_makemaker.t ..... ok
Test Summary Report
-------------------
t\010_module_build.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=3, Tests=3, 28 wallclock secs ( 0.13 usr + 0.13 sys = 0.25 CPU)
Result: FAIL
Failed 1/3 test programs. 1/3 subtests failed.