How to make OpenGL apps in 64-bit Windows?
The 64-bit OpenGL import library is included in the Windows SDK and gets installed to %ProgramFiles%\Microsoft SDKs\Windows\<version>\Lib\x64\OpenGL32.lib
. The corresponding DLL is named opengl32.dll
and is located in %SystemRoot%\system32
. The 32-bit version is also named opengl32.dll
and is located in %SystemRoot%\syswow64
on 64-bit Windows.
You can't load 32-bit DLLs in a 64-bit process, so whatever you read about x64 apps using the 32-bit OpenGL DLL was incorrect. There is definitely a 64-bit OpenGL DLL, but it has "32" in its name, presumably to make porting easier.
Ruben Trancoso
Addicted programmer Do at home just because you can supporter
Updated on July 09, 2022Comments
-
Ruben Trancoso almost 2 years
My project compiles, link and run in xp32 then I tried to cross compile it to x64 and I came across a lot of questions:
- There's no native x64 instalable OpenGL SDK so I link against what?
- I saw someone saying that x64 apps use 32bits opengl dll. I tryied to run my compiled 64-bits app in a xp64 with drivers to my video card (radeon 4850), the same I use on xp32 and I got that typical error "bla bla bla, maybe reinstalling you application will resolve the problem"
- If I use video card drivers how to keep it working with another Cards, should I build a version for each? (no sense). Should I load an available library dinamicaly? (same no sense)
- Which is the reference implementation for x64? where do I find its libs to link against?
I'm really lost on that matter. I did a lot of searchs and found nothing that helped me understant till the momment.
So, what is the path? What I want to know to make native x64 OpenGL apps?
-
flexwang almost 10 yearsOh, I did not know it. That is wierd.
-
Patrick K over 9 yearsI'm not sure that is Microsofts fault: opengl.org/wiki/History_of_OpenGL and opengl.org/discussion_boards/showthread.php/…