x64 and X86 error in linking LNK1112 module machine type 'x64' ....

My Visual Studio 2008 project has the X86 set as the Target Machine, i.e. /MACHINE:X86. I’m making a .dll that includes a COM object, a .cu file with the CUDA runtime calls to allocate memory on the device and make the call to the kernel, and a kernel file with device and the global functions that gets #included near the top of the .cu file. I get the following error when the linker tries to link the .obj file made from the .cu file:

fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’

Somehow, unknown to me, the cuda compiler evidently compiles the .cu source with the target set to ‘x64’ and uses the 64-bit CUDA SDK .dlls. How it does this I do not know. There does not seem to be a cubin switch for this, except for --machine, but that is for linux only. I’m using Windows Vista Enterprise 64-bit. I seem to have NVIDIA Driver Version, which is probably just the file version. The NVIDIA CUDA SDK listed under Programs and Features doesn’t have its version listed, nor does the NVIDIA CUDA Toolkit. So, I’m not sure which version I’ve got. This machine is a loaner from Dell and the systems folks so I can try to get my code to run with a compute capable 1.3 card that is not hooked to a monitor. The systems folks set it up.

The machine has two NVIDIA graphics cards, a Quadro FX 1400 that is hooked to the monitor, and a Quadro FX 4800 that isn’t hooked to anything besides the bus.

I can’t link the deviceQuery sample for the same reason. I wanted to use the deviceQuery sample to tell me what the compute capability of the FX4800 card is, because it is not listed in Appendix A of the Programming Guide 2.1, and the blurb for it on the NVIDIA website tells me about the 190 cores and what an awesome pile of silicon it is, but the compute capability is not listed in the “Specifications” tab - or maybe I just can’t read.

I’m thinking to remove the NVIDIA CUDA SDK and install some other version, and maybe even go to to Windows XP 32 bit, and get rid of this supremely annoying Vista, but I’d like to do something less obtrusive.

I’m using the following compiler options for the .cu file:

(CUDA_BIN_PATH)\nvcc.exe" -Xptxas –v -c -arch=sm_13 -keep -ccbin "(VCInstallDir)bin” -DWIN32 -D_WINDOWS -D_DEBUG -D_USRDLL -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler /EHsc,/W3,/nologo,/Od,/Zi,/MTd,/RTC1 -I"(CUDA_INC_PATH)" -I.\ -I"(NVSDKCUDA_ROOT)"\common\inc -o (ConfigurationName)\$(InputName).obj (InputFileName)