After a few seconds of working nvcc crashes. Notice that “nvcc -V” and “nvcc --help” works well. Sample programs from GPU Computing SDK also compile from Visual Studio without any problem.
Can you show the exact output produced by the compiler when compiling this code with nvcc? As a side note, device-side printf() requires a GPU with compute capability 2.x, which I don’t think the GTS 250 has? By default, nvcc targets compute capability 1.0, you can use the compiler switches -arch or -gencode to target other compute capabilities.
Why did you decide that printf() is device-side? I supposed it to be host-side.
I found the reason of the problem. It is very strange and mysterious. The call nvcc --verbose -ccbin C:\dev\MSVS\VC\bin cuda.cu gives the following output:
#$ _SPACE_=
#$ _CUDART_=cudart
#$ _HERE_=(null)
and the compiler crashes.
But if use not nvcc but nvcc.exe everything goes ok. Thus nvcc.exe --verbose -ccbin C:\dev\MSVS\VC\bin cuda.cu outputs