Sign in to follow this  

old dx program not working on 64-bits

Recommended Posts

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?

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this