What is wrong? fatal error : Stray '"' character in command line

Hi, guys.
My code get a error like this:

1>CudaBuild:
1> Compiling CUDA source file cudaClass.cu…
1>
1> E:\YuPeng\CPPCode\feaMap-lbfgs-cuda\feaMap-lbfgs-cuda>“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe” -gencode=arch=compute_20,code=" sm_20,compute_20" -gencode=arch=compute_10,code=“sm_10,compute_10” --use-local-env --cl-version 2010 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64” -I"E:\YuPeng\CPPCode\liblbfgs-1.10\include" -IE:\YuPeng\CPPCode\myHeader -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN64 -DNDEBUG -D_CONSOLE -D_MBCS -Xcompiler “/EHsc /W3 /nologo /O2 /Zi /MD " -o x64\Release\cudaClass.cu.obj “E:\YuPeng\CPPCode\feaMap-lbfgs-cuda\feaMap-lbfgs-cuda\cudaClass.cu”
1>nvcc : fatal error : Stray '”’ character in command line
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets(592,9): error MSB3721: The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe” -gencode=arch=compute_20,code=" sm_20,compute_20" -gencode=arch=compute_10,code=“sm_10,compute_10” --use-local-env --cl-version 2010 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64” -I"E:\YuPeng\CPPCode\liblbfgs-1.10\include" -IE:\YuPeng\CPPCode\myHeader -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN64 -DNDEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MD " -o x64\Release\cudaClass.cu.obj “E:\YuPeng\CPPCode\feaMap-lbfgs-cuda\feaMap-lbfgs-cuda\cudaClass.cu”” exited with code -1.
1>
1>Build FAILED

What’s wrong? Any suggestions?

It is not clear to me if your problem is due to Visual Studio or to the code itself. Could you reduce your code to a minimum sized program reproducing the error, so that someone could compile and run it and help you?

nvcc complains about bad syntax of the commandline. It’s difficult to parse visually. I would try adding a space after each -I switch to see whether that helps.

Never mind, I create a new one and it works just fine.