Hi, On Wed, Jul 14, 2004 at 08:45:04PM +0200, Lionel Ulmer wrote: > > Uhhh. So should I file a bug report? > > Well, it would be a nice way to prevent it falling out of my TODO list > (which is rather huge :-) ). > > > I don't see where the conflict is. I thought that wgl was Windows only. > > What Linux headers will define prototypes that appear in wgl.h? > > The problem is not with the wgl.h header, but with the other OpenGL headers > (GL/gl.h, GL/glext.h) which are almost the same between Windows and Linux. > except for the calling convention. And as you use Wine's OpenGL library, you > need to include a GL/gl.h file that defines this prototype with a 'stdcall' > convention (which you will not have when including Linux' GL include which > declares it as a 'cdecl' prototype). So Wine needs also to provide not only > wgl.h but also GL/gl.h and GL/glext.h. > > Basically, it's a mess :-) ...which could perhaps be solved by making the calling convention a define in the Linux headers, no?
/* our headers usually need cdecl, but external software sometimes has different requirements, so allow overriding */ #ifndef WGL_CALLCONV #define WGL_CALLCONV cdecl #endif And Wine then simply does: #define WGL_CALLCONV stdcall #include "opengl_header.h" Or am I completely and utterly mistaken here? Andreas Mohr