[PyOpenGL-Users] Parse error in GLU.__init__.0102.inc
Brought to you by:
mcfletch
|
From: John J. L. <jj...@po...> - 2002-07-14 19:13:58
|
I built and installed Mesa 4.0.3 (with GLUT 3.7), and then tried
compiling PyOpenGL 2.0.0.44 (with the same gcc that I used to compile
Python). Here are the system details:
>>> print sys.platform
linux2
>>> print sys.version
2.2 (#1, Jan 6 2002, 16:57:53)
[GCC 2.95.2 20000220 (Debian GNU/Linux)]
>>> print distutils.__version__
1.0.3
The examples from Mesa work fine. However, I get a parse error a little
while after starting a python setup.py build (not build_w):
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DGLX_PLATFORM -DNUMERIC -I/usr/include -I/usr/local/include -I/usr/X11$6/include -I/usr/local/include/python2.2/Numeric -Isrc/gle/src -I/usr/local/include/python2.2 -c src/interface/GLU.__init___.c -o build/temp.linux-i586-2.2/GLU.__init___.o
In file included from src/interface/GLU.__init___.c:9:
src/interface/GLU.__init___.0102.inc: In function `SWIG_ConvertPtr':
src/interface/GLU.__init___.0102.inc:361: warning: suggest explicit braces to avoid ambiguous `else'
src/interface/GLU.__init___.0102.inc:364: warning: suggest explicit braces to avoid ambiguous `else'
src/interface/GLU.__init___.0102.inc:380: warning: suggest explicit braces to avoid ambiguous `else'
src/interface/GLU.__init___.0102.inc: At top level:
src/interface/GLU.__init___.0102.inc:676: warning: function declaration isn't a prototype
src/interface/GLU.__init___.0102.inc:722: warning: function declaration isn't a prototype
src/interface/GLU.__init___.0102.inc:770: warning: function declaration isn't a prototype
src/interface/GLU.__init___.0102.inc:1007: parse error before `GLUquadric'
src/interface/GLU.__init___.0102.inc:1007: warning: no semicolon at end of struct orunion
src/interface/GLU.__init___.0102.inc:1010: parse error before `}'
The problem seems to be src/interface/GLU.__init__.0102.inc , but
there's nothing obviously wrong with it. This file is 120k or so, but
here is a snippet of it (the first parse error occurs on the line
'GLUquadric *obj;'):
[...]
static char _doc_gluBuild2DMipmapsui[] = "gluBuild2DMipmapsui(target, components, format, pixels) -> None";
static char _doc_gluBuild2DMipmapsf[] = "gluBuild2DMipmapsf(target, components, format, pixels) -> None";
void CALLBACK throwGLUerror(GLenum code)
{
PyErr_SetGLUerror(code);
}
typedef struct
{
PyObject_HEAD
GLUquadric *obj;
PyObject *begin, *beginData, *edgeFlag, *edgeFlagData, *vertex, *vertexData;
PyObject *end, *endData, *combine, *combineData;
} PyGLUquadric;
PyGLUquadric *currentQuadric = NULL;
static void PyGLUquadric_Del(PyObject *self)
{
gluDeleteQuadric(((PyGLUquadric*)self)->obj);
PyObject_Del(self);
}
PyTypeObject PyGLUquadric_Type =
{
PyObject_HEAD_INIT(0)
0, /* ob_size */
"GLUquadric", /* tp_name */
[...]
Thanks for any help
John
|