wesleyhill wrote on Friday, August 05, 2005:
I loaded Windows XP x64 Edition and Visual Studio 2005 Beta 2 yesterday and I was interested in seeing if the project I’m working on works compiled for x64 (AMD64), which also meant compiling GLFW for x64.
The good news is it compiles straight away. It generates a few warnings though, mostly to do with 32-bit values being expanded to 64-bit pointer size, but none of these cases are actually pointers so it doesn’t matter. The other warnings are to do with the bizzare fact that Microsoft, in their infinite wisdom, went ahead and marked most of the standary C library as deprecated. All these warnings can be eliminated though with a simple patch that I might write once I figure out CVS.
Come runtime, glfwInit() will always fail, the fix is to define _GLFW_NO_DLOAD_GDI32 and _GLFW_NO_DLOAD_WINMM when compiling GLFW, since for some reason LoadLibrary() is failing. Setting these makes the _glfwLibs struct empty which the new compiler balks at, so that has to be removed from platform.h
Lastly, RDTSC timing of course no longer works since the assembly stuff doesn’t work on x64. All x64 chips have variable clockspeed anyway so this isn’t really an issue, and writing new assembly for x64 is a pain since the x64 compiler doesn’t have inline-assembly support and never will.
So good work Marcus on writing some solid code. If anybody else is interested in providing Windows x64 support in their GLFW programs, then I’ll put together these fixes into a patch against the current CVS.
Wesley Hill