[issue5431] cmpfunc in Python 3.0.1 windows installer

Nigel Galloway report at bugs.python.org
Fri Mar 6 14:22:34 CET 2009


New submission from Nigel Galloway <nigel_galloway at yahoo.com>:

C:\Users\Nigel\myPython\iajaar>C:\Users\Nigel\swigwin-1.3.38\swig -
c++ -python -py3  NigelzGLPK.swg

generated a C++ wrapper and a Python file. When I attempted to compile 
the wrapper against Python 3.0.1 it failed see the output log at the 
end of this message.


I decided to modify object.h from C:\Python30\include:

typedef PyObject *(*getattrofunc)(PyObject *, PyObject *);
typedef int (*setattrfunc)(PyObject *, char *, PyObject *);
typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *);
typedef PyObject *(*reprfunc)(PyObject *);


typedef PyObject *(*getattrofunc)(PyObject *, PyObject *);
typedef int (*setattrfunc)(PyObject *, char *, PyObject *);
typedef int (*cmpfunc)(PyObject *, PyObject *);
typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *);
typedef PyObject *(*reprfunc)(PyObject *);


adding the typedef for cmpfunc. It then compiles fine, AND appears to 
work.

C:\Users\Nigel\myPython\iajaar\Python>c:\Python30\python 
sample.iajaar.3.py
*     0: obj =  0.000000000e+000  infeas = 0.000e+000 (0)
*     2: obj =  7.333333333e+002  infeas = 0.000e+000 (0)
OPTIMAL SOLUTION FOUND
Z =  733.333333333 ; x1 =  33.3333333333 ; x2 =  66.6666666667 ; x3 =  
0.0


Is this good, or should I do something else?



Compile Log:

Build Log      Rebuild started: Project: nigelzGLPK, Configuration: 
Release|Win32
 Command Lines      Creating temporary 
file "c:\Users\Nigel\Documents\Visual Studio 2008
\Projects\nigelzGLPK\nigelzGLPK\Release\RSP00001137523960.rsp" with 
contents
[
/O2 /Oi /GL /I "C:\Users\Nigel\Documents\Visual Studio 2008
\Projects\glpk\include" /I "C:\Python30
\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "NIGELZG
LPK_EXPORTS" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy 
/Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /c /Zi /TP "..\..\..\..\..\myP
ython\iajaar\NigelzGLPK_wrap.cxx"
]
Creating command line "cl.exe @"c:\Users\Nigel\Documents\Visual Studio 
2008
\Projects\nigelzGLPK\nigelzGLPK\Release\RSP00001137523960.rsp" /nologo 
/errorReport:prompt"
 Output Window      Compiling...
NigelzGLPK_wrap.cxx
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1772) : error 
C2065: 'cmpfunc' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1772) : error 
C2146: syntax error : missing '}' before 
identifier 'SwigPyObject_compare'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1772) : error 
C2146: syntax error : missing ';' before 
identifier 'SwigPyObject_compare'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1817) : error 
C2059: syntax error : '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1818) : error 
C2065: 'tmp' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1825) : error 
C2059: syntax error : 'return'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1943) : error 
C2065: 'cmpfunc' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1943) : error 
C2146: syntax error : missing '}' before 
identifier 'SwigPyPacked_compare'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1943) : error 
C2146: syntax error : missing ';' before 
identifier 'SwigPyPacked_compare'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1988) : error 
C2059: syntax error : '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1989) : error 
C2065: 'tmp' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1996) : error 
C2059: syntax error : 'return'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1997) : error 
C2059: syntax error : '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1997) : error 
C2143: syntax error : missing ';' before '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(1997) : error 
C2059: syntax error : '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2001) : error 
C2143: syntax error : missing ';' before '{'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2001) : error 
C2447: '{' : missing function header (old-style formal list?)
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2400) : error 
C3861: 'SwigPyPacked_New': identifier not found
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2635) : error 
C2059: syntax error : '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2635) : error 
C2143: syntax error : missing ';' before '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2635) : error 
C2059: syntax error : '}'
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(2674) : error 
C2065: 'swig_types' : undeclared identifier
c:\users\nigel\mypython\iajaar\iajaar.h(59) : warning C4290: C++ 
exception specification ignored except to indicate a function is not 
__declspec(nothrow)
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3176) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3191) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3207) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3226) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3253) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3277) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3277) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3296) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3318) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3324) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3340) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3346) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3362) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3368) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3383) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3399) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3415) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3442) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3461) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3476) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3492) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3508) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3535) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3560) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3587) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3606) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3621) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3637) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3653) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3680) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3705) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3732) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3757) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3784) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3809) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3836) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3861) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3888) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3913) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3940) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3965) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(3992) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4017) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4044) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4069) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4096) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4121) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4148) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4173) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4200) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4225) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4252) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4277) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4282) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4311) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4317) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4330) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4345) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4361) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4377) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4404) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4429) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4456) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4481) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4508) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4533) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4560) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4585) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4612) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4637) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4664) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4689) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4716) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4741) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4768) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4793) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4820) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4845) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4872) : error 
C2065: 'swig_types' : undeclared identifier
..\..\..\..\..\myPython\iajaar\NigelzGLPK_wrap.cxx(4872) : fatal error 
C1003: error count exceeds 100; stopping compilation
 Results      Build log was saved 
at "file://c:\Users\Nigel\Documents\Visual Studio 2008
\Projects\nigelzGLPK\nigelzGLPK\Release\BuildLog.htm"
nigelzGLPK - 102 error(s), 1 warning(s)

----------
files: BuildLog.htm
messages: 83242
nosy: Nigel Galloway
severity: normal
status: open
title: cmpfunc in Python 3.0.1 windows installer
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file13254/BuildLog.htm

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5431>
_______________________________________


More information about the Python-bugs-list mailing list