I spent a some time last night trying to get JUCE to build for 64 bit Windows. The inline assembly would have to be replaced and a few other changes, but it’s pretty close.
I don’t have any pressing need to build 64-bit native Windows apps just yet, but it would be nice.
So I was curious - any thoughts on 64 bit support?
Longhorn is supposedly going to be both 32 bit and 64 bit on the same installation cd’s, so people with 64 bit cpu’s will get the 64 bit version installed… Just heads up…
I did see a few spots where pointers are cast to ints - you’ve got the 64-bit portability compiler warning "#pragma"ed off. There are a couple of places in the code where do it so you can check the alignment. These are all easy to clean up.
The only real architectural tweak I saw was that you have this type defined:
typedef int (MessageCallbackFunction) (void* userData);
A lot of the functions that are used as MessageCallbackFunctions return pointers for window handles or what have you. I was thinking that a good solution would be to define some JUCE-specific cross-platform type that corresponded to LONG_PTR and ULONG_PTR. Say, call it nint and nuint (native int), or whatever else you prefer.
You can’t use in-line assembly with the AMD64 compiler. Even if you could, the current assembly is 32 bit code. Quite a bit of it could be replaced with either Windows API functions or with the new intrinsics that are available with Visual Studio 2005. The SSE stuff would have to be rewritten.
The other thing I found out was that building this stuff with VS 2003 is fairly painful. It’s much easier with VS 2005, but that’s only in beta. You could do it with the platform SDK and writing your own makefile, but that would be a fair amount of typing.
Visual Studio 6 will export a makefile from a .dsp file, but MS removed that feature from VS 2003. So I guess that would work if someone had VS 6.