nvcc fatal : redefinition of argument 'compiler-bindir'

Hi, when I trying to run a project with CUDA ,it keeps telling errors:

nvcc fatal : redefinition of argument ‘compiler-bindir’ (任务 ID: 52)
2>19:27:15.355 1>
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 9.0.targets(883,9): error MSB3721: 命令““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\nvcc.exe” -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin” -x cu -I"C:\Users\ustc\Desktop\vectorized_stress_majorization-master\src\VectorizedStressMajorization\Eigen" -I"C:\Users\ustc\Desktop\vectorized_stress_majorization-master\src\VectorizedStressMajorization" -I"C:\Users\ustc\Desktop\vectorized_stress_majorization-master\src\VectorizedStressMajorization\Eigen" -I"C:\Users\ustc\Desktop\vectorized_stress_majorization-master\src\VectorizedStressMajorization" -I"C:\Users\ustc\Desktop\vectorized_stress_majorization-master\src\VectorizedStressMajorization\CUDA_SDK_ROOT_DIR-NOTFOUND\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" --keep-dir Release -maxrregcount=0 --machine 32 --compile “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin/nvcc.exe” -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin” -c -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/O2,/Zi,/MT -I"" -o Release/.obj -std=c++11 -Xcompiler="/EHsc -Ob2" -D_WINDOWS -DVERBOSE -D_FORCE_INLINES -D_MWAITXINTRIN_H_INCLUDED -DNDEBUG -D"CMAKE_INTDIR=“Release”" -DWIN32 -D_WINDOWS -DNDEBUG -D"CMAKE_INTDIR=“Release”" -D_MBCS -Xcompiler “/EHsc /W3 /nologo /O2 /FS /Zi /MD /GR” -o Release\cuSolver.cu.objRelease/.obj “C:\Users\ustc\Desktop\vectorized_stress_majorization-master-1\src\VectorizedStressMajorization\cuSolver.cu” -clean”已退出,返回代码为 1。

I guess maybe I didn’t compile CUDA_SDK_ROOT_DIR, but I can’t find it, and I have no idea how to compile it.

The reported error is due to this:

You are indeed specifying the -ccbin switch twice. If you added switches to the VS project, you should inspect what you added. If you did not, then your install seems to be broken. Start over with a clean install of VS followed by CUDA. You also appear to be building a 32-bit project using CUDA 9, which I don’t recommend.

It may also be that the problem here is in the project file itself. So deleting the project (file) and start over building a new project from the same source files may be a solution, especially if you can build and run cuda sample codes with this VS install properly.