Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


rneckelmann

Member Since 06 Apr 2010
Offline Last Active Nov 25 2011 01:41 PM

Topics I've Started

Windows: 32-bit and 64-bit in harmony

19 August 2010 - 08:05 AM

Currently I'm trying to make my personal game frameworks and libraries behave properly on both 32-bit (x86) and 64-bit (x64) Windows.

The actual cross-platformness is no problem for me, I got loads of experience in making my code run on both Windows, Linux, macs, and various toasters. My problem is more like trying to figure out how applications on Windows are expected to behave when it comes to 32-bit vs 64-bit.

My current procedure is:

In Visual Studio 2008 I got a "Win32" configuration and an "x64" configuration. The first one produces executables postfixed with a "32", while the latter uses a "64" postfix instead. For example: MyApp32.exe, MyApp64.exe, MyCoolLibrary32.dll, MyCoolLibrary64.dll, etc. Finally I produce a small x86 EXE-file called MyApp.exe which detects whether it's running under WoW64 (the x86 on x64 "emulation" layer on Windows) and runs MyApp64.exe if it's the case and MyApp32.exe otherwise.

It works perfectly for me, but I suspect it is not how I'm supposed to do it. :P

My main headache at the moment is with 3rd party libraries. I find it a huge mess to manage two different versions of each. For simpler libraries (like libjpeg, libpng, zlib, freetype, etc) I can get away with just linking with them statically. But for monsters like OpenSSL (which I'm fighting atm) it's a complete mess. Not to mention LGPL-licensed libraries which require that you link dynamically.

Now for my questions which I hope someone can enlighten me about:

1) Are applications expected to make seperate releases for x86 and x64? Or should it simply be up to the installer to install the right EXEs and DLLs? I prefer that the user don't have to worry about whether he/she is running 64-bit or not.

2) Can I somehow use .manifest files to make sure that my application links with the appropriate DLLs? I've never managed to understand exactly how manifests are used. If someone can direct me to "manifest files for dummies" I'd be very happy.


PARTNERS