Troubles with GL.h when compiling/building with .NET 2003

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2144: syntax error : 'void' should be preceded by ';'

I am having this problem with all the WINGDI declarations inside the GL.h when .NET links the libraries. Does anyone encounter the same? Is there a fix to this?

Somewhat unrelated: I’m using SDL for this and I’m looking where to set the run-time library to “Multithreaded DLL”.

Any help is greatly appreciated.

Just add #include <windows.h> before gl headers.

yooyo

Originally posted by yooyo:
[b]Just add #include <windows.h> before gl headers.

yooyo[/b]
Thank you for the fast response; however, I was aware of that particular problem and had tried it too. When I do that I get this new error:

NinPi error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)

NinPi is just the project name. I am also using SDL but I don’t think it’s the problem. Currently, my includes are:

#include <windows.h>

#include <GL/gl.h>
#include <GL/glu.h>
#include <SDL.h>

#include <stdio.h>
#include <stdlib.h>

My only guess is that some of the libraries are conflicting, though which ones they are I do not know.

try changing your runtime library to “Multi-threaded DLL (/MD)” …this should hopefully fix that problem…oops i just read your first post again, u allready mentioned this problem…anyway u will find this option in project->properties->c+±>Code generation->runtime library

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.