PDA

View Full Version : OpenGl on Win64



adwaitjoshi
09-10-2003, 07:15 AM
Is opengl supported on a 64 Bit architechture on windows? Is so then does it have different gl.h and glu.h because I seem to have getting som errors on a 64 bt machine when I am compiling a opengl code.

Deiussum
09-10-2003, 08:36 AM
Not having a 64-bit machine to work with I can't verify this, but I would imagine OpenGL would be supported. What sort of errors exactly are you getting? Maybe it's related to something else.

adwaitjoshi
09-10-2003, 08:42 AM
The errors are as follows. They are a little bit wierd and I thought it was because of a 64 Bit compile. This runs fine on a 32 Bit build. Here is a huge list of errors http://www.opengl.org/discussion_boards/ubb/smile.gif

C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1153) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1153) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1153) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1153) : error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1153) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1153) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1154) : error C2146: syntax error : missing ';' before identifier 'GLboolean'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1154) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1154) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1154) : error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1154) : error C2371: 'APIENTRY' : redefinition; different basic types
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1155) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1155) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1155) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1155) : error C2146: syntax error : missing ';' before identifier 'glArrayElement'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1155) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1155) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1156) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1156) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1156) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1156) : error C2146: syntax error : missing ';' before identifier 'glBegin'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1156) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1156) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1157) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1157) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1157) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1157) : error C2146: syntax error : missing ';' before identifier 'glBindTexture'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1157) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1157) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1158) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1158) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1158) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1158) : error C2146: syntax error : missing ';' before identifier 'glBitmap'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1158) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1158) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1159) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1159) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1159) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1159) : error C2146: syntax error : missing ';' before identifier 'glBlendFunc'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1159) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1159) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1160) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1160) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1160) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1160) : error C2146: syntax error : missing ';' before identifier 'glCallList'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1160) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1160) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1161) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1161) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1161) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1161) : error C2146: syntax error : missing ';' before identifier 'glCallLists'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1161) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1161) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1162) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1162) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1162) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1162) : error C2146: syntax error : missing ';' before identifier 'glClear'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1162) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1162) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1163) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1163) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1163) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1163) : error C2146: syntax error : missing ';' before identifier 'glClearAccum'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1163) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1163) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1164) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1164) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1164) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1164) : error C2146: syntax error : missing ';' before identifier 'glClearColor'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1164) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1164) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1165) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1165) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1165) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1165) : error C2146: syntax error : missing ';' before identifier 'glClearDepth'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1165) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1165) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1166) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1166) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1166) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1166) : error C2146: syntax error : missing ';' before identifier 'glClearIndex'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1166) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1166) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1167) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1167) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1167) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1167) : error C2146: syntax error : missing ';' before identifier 'glClearStencil'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1167) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1167) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1168) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1168) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1168) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1168) : error C2146: syntax error : missing ';' before identifier 'glClipPlane'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1168) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1168) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft SDK\include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1169) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft SDK\include\gl\GL.h(1169) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft SDK\include\gl\GL.h(1169) : fatal error C1003: error count exceeds 100; stopping compilation

gumby
09-10-2003, 08:48 AM
Have you gotten opengl to work under win32? It looks like you forgot to include windows.h before gl.h

adwaitjoshi
09-10-2003, 09:01 AM
Yes sir I did ! It works on win32 and I also have included windows.h http://www.opengl.org/discussion_boards/ubb/frown.gif http://www.opengl.org/discussion_boards/ubb/frown.gif please help me I seem to have no solution http://www.opengl.org/discussion_boards/ubb/smile.gif

Deiussum
09-10-2003, 10:15 AM
Did you include windows.h BEFORE gl.h. The BEFORE is important here because C/C++ compiles top down. gl.h uses stuff that's defined in windows.h like WINGDIAPI and APIENTRY. If you are absolutely sure that windows.h is BEFORE gl.h for every source file it's included, then take a look at your windows.h file and see if you can find where those are at. (I think they are actually in winbase.h which is included by windows.h, but I'm not positive of that.)

zeckensack
09-10-2003, 11:26 AM
You may need an updated windows.h that defines this stuff for 64 bit machines. Go bother Micros~1 http://www.opengl.org/discussion_boards/ubb/smile.gif

adwaitjoshi
09-10-2003, 11:39 AM
Got it working ! http://www.opengl.org/discussion_boards/ubb/smile.gif Thanks for you guy's help.

Deiussum
09-10-2003, 12:14 PM
Just out of curiosity, was it the ordering, or did you need an updated windows.h? I looked through the Windows headers I have and nothing jumped out at me that would explain why those particular defines wouldn't have been included with the 64-bit architecture, but then I didn't look that closely either.

adwaitjoshi
09-10-2003, 12:43 PM
it was as you guessed !! ordering http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif thanks.

1234!
09-10-2003, 01:29 PM
In this case I dont understand why it compiled under Win32 then (as you said).

Perhaps some precompiler related stuff, I assume.

Can someone hand me a 64 bit system please http://www.opengl.org/discussion_boards/ubb/wink.gif