Jump to content
  • Advertisement
Sign in to follow this  
Cornstalks

Visual Studio 2008 Professional Edition Hates gl.h

This topic is 3817 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just got Visual Studio 2008 Professional Edition, so I'm moving my Code::Blocks projects over to Visual Studio. However, Visual Studio fails to compile them because of the gl.h header. Even though the gl.h header came with Visual Studio, it still can't compile it. Below are the errors that it gives me.
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1154) : error C2146: syntax error : missing ';' before identifier 'GLboolean'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1154) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1154) : error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1154) : error C2371: 'APIENTRY' : redefinition; different basic types
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1155) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1155) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1155) : error C2146: syntax error : missing ';' before identifier 'glArrayElement'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1155) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1155) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1156) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1156) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1156) : error C2146: syntax error : missing ';' before identifier 'glBegin'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1156) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1156) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1157) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1157) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1157) : error C2146: syntax error : missing ';' before identifier 'glBindTexture'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1157) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1157) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1158) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1158) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1158) : error C2146: syntax error : missing ';' before identifier 'glBitmap'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1158) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1158) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1159) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1159) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1159) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1159) : error C2146: syntax error : missing ';' before identifier 'glBlendFunc'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1159) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1159) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1159) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1160) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1160) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1160) : error C2146: syntax error : missing ';' before identifier 'glCallList'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1160) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1160) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1161) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1161) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1161) : error C2146: syntax error : missing ';' before identifier 'glCallLists'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1161) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1161) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1162) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1162) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1162) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1162) : error C2146: syntax error : missing ';' before identifier 'glClear'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1162) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1162) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1162) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1163) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1163) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1163) : error C2146: syntax error : missing ';' before identifier 'glClearAccum'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1163) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1163) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1164) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1164) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1164) : error C2146: syntax error : missing ';' before identifier 'glClearColor'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1164) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1164) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1165) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1165) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1165) : error C2146: syntax error : missing ';' before identifier 'glClearDepth'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1165) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1165) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1166) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1166) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1166) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1166) : error C2146: syntax error : missing ';' before identifier 'glClearIndex'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1166) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1166) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1166) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1167) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1167) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1167) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1167) : error C2146: syntax error : missing ';' before identifier 'glClearStencil'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1167) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1167) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1167) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1168) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1168) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1168) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1168) : error C2146: syntax error : missing ';' before identifier 'glClipPlane'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1168) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1168) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1168) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1169) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1169) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1169) : error C2146: syntax error : missing ';' before identifier 'glColor3b'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1169) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1169) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1170) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1170) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1170) : error C2146: syntax error : missing ';' before identifier 'glColor3bv'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1170) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1170) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1171) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1171) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1171) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1171) : error C2146: syntax error : missing ';' before identifier 'glColor3d'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1171) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1171) : error C2086: 'int APIENTRY' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'APIENTRY'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1171) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1172) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1172) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1172) : error C2086: 'int WINGDIAPI' : redefinition
1>        c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : see declaration of 'WINGDIAPI'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1172) : error C2146: syntax error : missing ';' before identifier 'glColor3dv'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1172) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1172) : fatal error C1003: error count exceeds 100; stopping compilation
However, all these errors disappear and it compiles fine if I include windows.h before I include gl.h, even though I'm not using anything windows specific in most of my program. Is there any way to include gl.h without including windows.h?

Share this post


Link to post
Share on other sites
Advertisement
#include <windows.h> before gl.h. Its just something you have to do.

The windows gl header needs definitions that are in windows.h.

Share this post


Link to post
Share on other sites
Bloody windows. Haha thanks. Visual Studio better be worth the pain. Hmmm... maybe I should just put a #include <windows.h> in the gl.h header?

Share this post


Link to post
Share on other sites
Quote:
Original post by MikeTacular
Bloody windows. Haha thanks. Visual Studio better be worth the pain. Hmmm... maybe I should just put a #include <windows.h> in the gl.h header?


I suppose you could, but I wouldn't do it. Its not a great idea to edit standard headers.

Share this post


Link to post
Share on other sites
Or you could just ... include windows.h.

Its not really that big of a deal, really. Define WIN32_LEAN_AND_MEAN if you want though I don't know if gl.h can compile with that defined or not.

Share this post


Link to post
Share on other sites
Quote:
Original post by MikeTacular
Visual Studio better be worth the pain. Hmmm... maybe I should just put a #include <windows.h> in the gl.h header?


I think once you get used to the quirks, that you will enjoy using it. Also, add another vote to the "probably not a good idea to edit standard header files" camp.

Share this post


Link to post
Share on other sites
I could be wrong, but I think even though OpenGL is cross-platform, if you're compiling an OpenGL app under Windows it needs to use the API defined by the operating system it's compiling under. I would guess - I haven't looked at any of the OpenGL headers - that they use something like this to choose what to do depending on the OS:


#ifdef WINDOWS // If it's running under windows
//do stuff so OpenGL uses Windows functions
#elseif SOME_OTHER_OS // if it's running another OS
//do stuff so OpenGL uses that OS's functions
#endif


<disclaimer>Pure speculation!</disclaimer>

Share this post


Link to post
Share on other sites
Unfortunately it's to do with the way functions get exported into the DLLs and libs in VC++ - function names get a bit mangled and you need a some extra definitions with your functions.

Don't touch the GL.H header. Just include Windows.h. If ever you have to give your code to someone else, they won't have a modified GL.H and you shouldn't have to expect them to go through changing their platform SDK. Also, since your coding on Windows (and Visual Studio), you're no doubt going to use a couple of the Win32 API functions during your life time - although it may not seem like it not and libraries like SDL can handle everything for you, when you start getting more serious you won't be able to avoid things like high resolution timers, Win32 file I/O, etc.

Anyway, good work on moving to Visual Studio :). I have been using Visual Studio 2008 since it came out (was using 2003 before hand, 2005 felt too sluggish for me on my machine) and it's a dream. Once you get friendly with the Visual C++ debugger you won't know how you ever survived!

Share this post


Link to post
Share on other sites
Thanks for the tips. I haven't touched the gl.h header, and I've now included windows.h and defined WIN32_LEAN_AND_MEAN (which I'll just undefine if it becomes a problem). And yes, mostly what I've heard about Visual Studio is that its debugger is heaven. To be honest, I've never used a debugger before, so I'm kinda excited to see what's gonna happen. It's just taking me while to make all my code UNICODE though... used to just be ANSI but now I'm supporting both

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!