Now that CUDA 1.1 supports Windows XP 64, I have started migrating my apps to the new platform. While doing so, I have found that I am only able to successfully compile cuda source files when the target platform matches the build platform;
i.e Build -> Target
1 WIN32 -> WIN32 = success
2 WIN32 -> WIN64 = failure
3 WIN64 -> WIN32 = failure
4 WIN64 -> WIN64 = success
The error I encounter during case (2) is the following:
fatal error LNK1112: module machine type ‘X86’ conflicts with target machine type ‘x64’ (and vice versa for case 3)
In order to compile my cuda source files, I am using the ‘-c’ option and supplying the msvc compiler directory, in the same way as is done in the CUDA SDK examples. Note that the SDK examples will also fail in the same way as above.
It is my understanding that although you cannot run a 64-bit windows app on a 32-bit platform, visual studio allows you to compile the 64-bit app on the 32-bit platform. I do almost all of my development on WinXP 32 and so I would hate to have to use multiple machines simply to ensure that my 64-bit configuration builds successfully.
Has anyone else run into this issue? Any solutions?