From: Eero P. <epa...@ko...> - 2000-05-25 06:23:05
|
I compiled the latest CVS sources using the Makefile.fx. There were problems with mesa_wgl.h and undefined HGLRC etc. glheader.h defines these symbols, but it includes gl.h (which includes mesa_wgl.h) before defining them. Thus I was able to get rid of these errors by moving the point where glheader.h includes gl.h to a latter position in the file: (patch attached in the end) I also #if ed out the #define CALLBACK in glheader.h because it gave me duplicate definition warnings. There were also problems in compiling some of the subdirectories of src. In order to fix these I changed: fxdrv.h, osmesa.c and x86.c to include glheader.h before including other Mesa headers. With these changes I got the library to compile, but there is an other problem: When my application code uses <GL/gl.h> (or even GL/glut.h), I get errors from mesa_wgl.h. I assume that I could fix these by including windows.h first but a) I don't want to b) I thought that especially with glut.h that should not be needed. I am not sure how to fix this, except by placing the definitions of HGLRC etc back to one of the GL/*.h files, or including <windows.h> there. Notice that doing, one of these might be incompatible with my patch for compiling Mesa library itself. Eero Index: glheader.h =================================================================== RCS file: /cvsroot/mesa3d/Mesa/src/glheader.h,v retrieving revision 1.9 diff -c -r1.9 glheader.h *** glheader.h 2000/05/22 19:41:34 1.9 --- glheader.h 2000/05/25 06:09:44 *************** *** 63,71 **** #include "conf.h" #endif - /* Make sure we include glext.h */ - #include "GL/gl.h" - #include "GL/glext.h" --- 63,68 ---- *************** *** 133,139 **** --- 130,138 ---- /* compatability guard so we don't need to change client code */ #if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) + #if 0 # define CALLBACK GLCALLBACK + #endif typedef int (GLAPIENTRY *PROC)(); typedef void *HGLRC; typedef void *HDC; *************** *** 158,163 **** --- 157,165 ---- #include <gl/mesa_wgl.h> #endif + /* Make sure we include glext.h */ + #include "GL/gl.h" + #include "GL/glext.h" |