I want to use nvcc -ptx
from windows command line, but I always get this error message:
nvcc : fatal error : Microsoft Visual Studio configuration file \'vcvars
I have managed to solve the issue and make work with MS Visual Studio Express 2012, here what I did:
The compilation worked great:
C:\CUDA>nvcc -o square square.cu Creating library square.lib and object square.exp
C:\CUDA>square.exe 0.000000 1.000000 4.000000 9.000000 16.000000 25.000000 36.000000 49.000000 64.000000 81.000000 100.000000 121.000000 144.000000 169.000000 196.000000 225.000000
When in your project go to Configuration Properties > CUDA C/C++ > Device and change Code Generation to the following: compute_11,sm_11
From NVIDIA CUDA Compiler Driver document
1.2. Supported Host Compilers nvcc uses the following compilers for host code compilation:
On Linux platforms
The GNU compiler, gcc, and arm-linux-gnueabihf-g++ for cross compilation to the ARMv7 architecture
On Windows platforms
The Microsoft Visual Studio compiler, cl On both platforms, the compiler found on the current execution search path will be used, unless nvcc option -compiler-bindir is specified (see File and Path Specifications).