old dx program not working on 64-bits

Started by
0 comments, last by sirob 16 years, 10 months ago
I think I know the answer to this, but want to double check and maybe get more info. I just got a 64-bit CPU and tried to build an old 32-bit program I made using the 64-bit directX libs. However, I got lots of linker errors. When I switched to the 32-bit directX libs, it worked. So I think the problem is that I can't mix a 32-bit program with 64-bit libs. Is that right? Also, where is the setting in Visual Studio 2005 to make a 64-bit program? Last question, since there is a mix of 32/64-bits, should developers release both 32-bit and 64-bit executables?
-----Quat
Advertisement
If you didn't set Visual Studio to create an x64 (64 bit) program, it most likely compiled and linked to a x86 (32 bit) target. In this case, you were trying to use 64 bit libraries with a 32 bit application, which will fail.

To compile to x64 with Visual Studio 2005, you need a full version of VS (i.e. not an express version). Also, you need to select the x64 compiler during installation, otherwise, it isn't installed.

Once you have that, you can change the Target Platform setting in the Linker section of the Project's Properties to x64, and that should compile to 64 bits.

As far as I know, native DX fully supports 64 bit programs. Also, I believe Managed DX doesn't support 64bit targets at this time.

Frankly, supporting 64 bit applications at this time wouldn't seem reasonable. The performance gains it would provide would be minimal, and your application is unlikely to require more than 2gb of system memory, so there really is no reason to build a 64bit version of your application.

At this time, any x64 system can also run 32 bit applications. Maybe if you had to support Itanium systems it could be justified, but that's a whole other topic.

Hope this helps.
Sirob Yes.» - status: Work-O-Rama.

This topic is closed to new replies.

Advertisement