Help: request for assistance with PyOpenGL distribution using dis tutils on NT
Background: While stuck on my real work, I'm trying to get a PyOpenGL distribution (1.5.6alpha1 from CVS) working using distutils. Rene Liebscher kindly created an installation script that seems to work for him on Win32 for the 1.5.5 PyOpenGL, and for Jason Petrone (on Linux) using the 1.5.6 source from CVS. I'm working on NT 4.0 sp3, using VC++ 6.0sp3, (I get similar effects on Cygnus, but since I'm not sure the package builds under that compiler I'm not focussing on it yet). When trying to build, I get a long set of errors (see below), the elimination of which is well beyond my meagre VC++ or distutils skills to fix. According to MSDN, the problems I'm getting are normally caused by having a C++ file compiled as a C file. To get around it, you apparently put an ifdef at the top and bottom of the file, but the file concerned (GL.h) has this check, and still reports the errors. I'm assuming there's some flag that needs to be set somewhere, but I don't know what it is. Note: everything builds fine using the old setup script for the latest CVS version on this machine (the one for which I'm trying to get a distutils script). D:\bin\lang\studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX -Isrc -ID:\bin\lang\Python\Include /Tcsrc/_glumodule.c /Fobuild\temp.win32\Release\src/_glumodule.obj Doesn't work. The GUI under the old BUILD.py uses: /nologo /MD /W3 /GX /O2 /Ob2 /I "D:\bin\lang\Python\include" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /Fp"tmp\./_glu.pch" /YX /Fo"tmp\./" /Fd"tmp\./" /FD /c and works fine. GL.h has the following code near the top (and close at the bottom): #ifdef __cplusplus extern "C" { #endif Which, according to MSDN, should avoid the errors, but doesn't seem to. Here's the output from running setup.py build... S:\PyOpenGL>setup build running build running build_py warning: build_py: package init file 'OpenGL\__init__.py' not found (or not a re gular file) warning: build_py: package init file 'OpenGL\Demo\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\Demo\da\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\Demo\dek\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\Demo\dek\OglSurface\__init__.py' no t found (or not a regular file) warning: build_py: package init file 'OpenGL\Demo\srenner\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\Demo\srenner\Images\__init__.py' no t found (or not a regular file) warning: build_py: package init file 'OpenGL\Demo\tom\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\GL\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\GLU\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\GLUT\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\Tk\__init__.py' not found (or not a regular file) warning: build_py: package init file 'OpenGL\shared\__init__.py' not found (or n ot a regular file) running build_ext skipping '_opengl' extension (up-to-date) skipping 'openglutil' extension (up-to-date) building '_glu' extension D:\bin\lang\studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX -Isrc -ID:\bin\lan g\Python\Include /Tcsrc/_glumodule.c /Fobuild\temp.win32\Release\src/_glumodule. obj _glumodule.c src\GL/gl.h(1135) : error C2054: expected '(' to follow 'WINGDIAPI' src\GL/gl.h(1135) : error C2085: 'APIENTRY' : not in formal parameter list src\GL/gl.h(1135) : error C2146: syntax error : missing ',' before identifier 'g lAccum' src\GL/gl.h(1135) : error C2143: syntax error : missing ';' before '(' src\GL/gl.h(1135) : error C2059: syntax error : ')' src\GL/gl.h(1136) : error C2054: expected '(' to follow 'WINGDIAPI' src\GL/gl.h(1136) : error C2085: 'APIENTRY' : not in formal parameter list src\GL/gl.h(1136) : error C2146: syntax error : missing ',' before identifier 'g lAlphaFunc' src\GL/gl.h(1136) : error C2143: syntax error : missing ';' before '(' src\GL/gl.h(1136) : error C2059: syntax error : ')' src\GL/gl.h(1137) : error C2054: expected '(' to follow 'WINGDIAPI' ... (100 errors, then stops due to having so many) Does anyone have any suggestions on how to fix this (keeping in mind that I'm not a C/C++ programmer, so the instructions should be pretty basic)? Thoughts appreciated, Mike __________________________________ Mike C. Fletcher Designer, VR Plumber http://members.home.com/mcfletch
participants (3)
-
Mike Fletcher
-
Rene Liebscher
-
Thomas Heller