Skip Menu |

This queue is for tickets about the Curses CPAN distribution.

Report information
The Basics
Id: 2099
Status: resolved
Priority: 0/
Queue: Curses

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.06
Fixed in: (no value)



Subject: Curses.c(275) : error C2198: 'Perl_sv_isa' : too few actual parameters
What to do? Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -IE:\new\PDCurses-2.6\win32 -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEX T -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"1.06\" -DXS_VERSION=\"1.06\" "-IC:\Perl\lib\CORE" Curses.c Curses.c C:\Program Files\Microsoft Visual Studio\VC98\include\wincon.h(95) : warning C4005: 'MOUSE_MOVED' : macro redefinition E:\new\PDCurses-2.6\win32\pdcurses.h(776) : see previous definition of 'MOUSE_MOVED' C:\Perl\lib\CORE\embed.h(1761) : warning C4005: 'instr' : macro redefinition E:\new\PDCurses-2.6\win32\pdcurses.h(2004) : see previous definition of 'instr' Curses.c(275) : warning C4133: 'function' : incompatible types - from 'struct sv *' to 'struct interpreter *' Curses.c(275) : warning C4133: 'function' : incompatible types - from 'char [15]' to 'struct sv *' Curses.c(275) : error C2198: 'Perl_sv_isa' : too few actual parameters NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. E:\new\Curses-1.06>perl -V Summary of my perl5 (revision 5 version 6 subversion 1) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY S -DPERL_MSVCRT_READFIX', optimize='-O1 -MD -DNDEBUG', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:/Perl\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib" "C:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi 32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib ne tapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -libpath:"C:/Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 633 Built under MSWin32 Compiled at Jun 17 2002 21:33:05 @INC: C:/Perl/lib C:/Perl/site/lib . E:\new\Curses-1.06>
Change Perl_sv_isa to sv_isa // if (Perl_sv_isa(sv, "Curses::Window")) { if (sv_isa(sv, "Curses::Window")) { I don't know where the author got Perl_sv_isa, but he shouldn't be using it. It is not mentioned in perlapi or any perl documentation. Props to http://dbforums.com/arch/96/2002/9/494449 for hint.
Great, that got me a little further, no I'm faced with pdcurses.lib(pdcutil.obj) : error LNK2001: unresolved external symbol __pctype pdcurses.lib(pdcutil.obj) : error LNK2001: unresolved external symbol ___mb_cur_max GEN support: not applicable PANELS support: enabled MENUS support: not enabled FORMS support: not enabled Making a guess for $inc and/or $libs... Note (probably harmless): No library found for '-lpanel' Writing Makefile for Curses E:\new\Curses-1.06>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -IE:\new\PDCurses-2.6\win32 -nologo -O1 -MD -DNDEBUG - DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEX T -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG - DVERSION=\"1.06\" -DXS_VERSION=\"1.06\" "-IC:\Perl\lib\CORE" Curses.c Curses.c C:\Program Files\Microsoft Visual Studio\VC98\include\wincon.h(95) : warning C4005: 'MOUSE_MOVED' : macro redefinition E:\new\PDCurses-2.6\win32\pdcurses.h(776) : see previous definition of 'MOUSE_MOVED' C:\Perl\lib\CORE\embed.h(1761) : warning C4005: 'instr' : macro redefinition E:\new\PDCurses-2.6\win32\pdcurses.h(2004) : see previous definition of 'instr' CursesFun.c(1279) : warning C4133: 'initializing' : incompatible types - from 'struct _PerlIO *' to 'struct _iobuf *' CursesFun.c(1280) : warning C4133: 'initializing' : incompatible types - from 'struct _PerlIO *' to 'struct _iobuf *' CursesFun.c(3764) : warning C4087: 'getmouse' : declared with 'void' parameter list CursesFun.c(4258) : warning C4047: 'initializing' : 'int *' differs in levels of indirection from 'int ' CursesFun.c(4368) : warning C4047: 'initializing' : 'struct _win *' differs in levels of indirection from 'int ' CursesFun.c(4447) : warning C4047: 'initializing' : 'int *' differs in levels of indirection from 'int ' CursesFun.c(4466) : warning C4047: 'initializing' : 'int *' differs in levels of indirection from 'int ' Curses.c(285) : warning C4715: 'c_sv2window' : not all control paths return a value Curses.c(260) : warning C4715: 'c_sv2screen' : not all control paths return a value Curses.c(239) : warning C4715: 'c_sv2panel' : not all control paths return a value "Running Mkbootstrap for Curses ()" C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Curses.bs link -out:blib\arch\auto\Curses\Curses.dll -dll -nologo - nodefaultlib -release -libpath:"C:/Perl\lib\CORE" -machine:x86 Curses.obj C:\Perl\lib\CORE\perl56.lib E:\new\PDCurses-2.6\win32\pdcurses.lib E:\new\PDCurses-2.6\win32\panel.lib "C:\Program Files\Microsoft Visual Studio\VC98\lib\oldnames.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\kernel32.lib" "C:\Program Files\Microsoft Visual Studio\VC 98\lib\user32.lib" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\gdi32.lib" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\winspool .lib" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\comdlg32.lib" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\advapi32.lib" "C:\ Program Files\Microsoft Visual Studio\VC98\lib\shell32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\ole32.lib" "C:\Program Files\ Microsoft Visual Studio\VC98\lib\oleaut32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\netapi32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\uuid.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\wsock32.lib" "C:\Program Files\Microsoft Visual Studio\V C98\lib\mpr.lib" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\winmm.lib" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\version.li b" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\odbc32.lib" "C:\Program Files\Microsoft Visual Studio\VC98 \lib\odbccp32.lib" "C:\Progr am Files\Microsoft Visual Studio\VC98\lib\msvcrt.lib" -def:Curses.def Creating library blib\arch\auto\Curses\Curses.lib and object blib\arch\auto\Curses\Curses.exp LINK : warning LNK4049: locally defined symbol "_SP" imported LINK : warning LNK4049: locally defined symbol "_stdscr" imported LINK : warning LNK4049: locally defined symbol "_curscr" imported LINK : warning LNK4049: locally defined symbol "_LINES" imported LINK : warning LNK4049: locally defined symbol "_COLS" imported LINK : warning LNK4049: locally defined symbol "_COLORS" imported LINK : warning LNK4049: locally defined symbol "_COLOR_PAIRS" imported pdcurses.lib(pdcutil.obj) : error LNK2001: unresolved external symbol __pctype pdcurses.lib(pdcutil.obj) : error LNK2001: unresolved external symbol ___mb_cur_max blib\arch\auto\Curses\Curses.dll : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop.
You need to link to microsofts LIBC.LIB Make the following change in Makefile.PL 'visualc' => [ '-IE:\new\PDCurses-2.6\win32' => '-LC:\Progra~1\Micros~1\VC98\Lib LIBC.LIB -L E:\new\PDCurses-2.6\win32 pdcurses.lib panel.lib' # curses.lib ], 'default' => 'visualc' After which it will compile fine. Too bad there ain't no tests ;)
I have just taken over maintainership of this package and have changed the Perl_sv_isa to sv_isa in Curses-1.07.