nvcc and MSVS 2008 ...once again

Hello,

I know this topic has been discussed already, and MSVS2008 is not supported by nvcc.

However, I use nvcc only to produce .cubin file, and it still complains that is does not support MSVS 2008. I believe cubin generation should not depend on MSVS version?

Any workaround?

UPD.: One workaround is to install VC2005 Express Edition and specify path to its VC\bin in nvcc.profile.

Huh, I didn’t know you could do that. Where exactly do you specify the option in the profile? It isn’t immediately obvious.

I’ve got an issue on Vista64 where nvcc reports an unreported compiler from within a 64-bit build environment. I’ve worked around it by hacking my build system to specify -ccbin, but setting it in the profile is much cleaner. What is odd is that when nvcc is run from within a 32-bit build environment it goes and uses the 64-bit cl.exe! This issue has been reported and hopefully it will fixed soon. It should be a simple thing to change how the cl.exe compiler to use is looked up in nvcc.

Edit: Never mind, the next thread in the list answers the question http://forums.nvidia.com/index.php?showtopic=51223

Except that compile-bindir doesn’t seem to have an effect in the CUDA 2.0 beta :(

i have installed CUDA 2.0beta on my machine and I am using VS2008 with redirect binpath to VS2005 and it is functional . i am using old rule with some modifications for CUDA that is somewhere on this forum

MisterAnderson42
If it doesn’t work from nvcc.profile maybe it will work if you specify --compiler-bindir switch when invoking nvcc?

Yes, that is what I am doing. I’ve hardcoded “C:\Program Files (x86) blah blah” into the build as a hack. It works for me, but wont for someone who installed VC somewhere else. My build system (CMake) already takes care of finding the 64-bit compiler for me so the ideal situation would be just to use that. nvcc is using the 64-bit cl (confirmed by checking the output of nvcc -v), so there is no reason it shouldn’t work, except that nvcc is programed to find the 64-bit cl from the 32-bit compile-bindir and fails if you give it the 64-bit cl in the path… NVIDIA has change the status of the bug I submitted to “Open to fix” so hopefully this all becomes a non-issue.