0
votes

I was trying to compile Darknet on my machine with CUDA 10.0 and opencv 3.4.0 on VS 2017 (using v140 toolkits), and I got 11 MSB3721 errors located in CUDA 10.0.targets, line "< CudaCompile...".

I typed the command into CMD and seemed that system couldn't found the such path, then I noticed that I had a semicolon (;) in the nvcc path between "v10.0" and "\bin":

MSB3721 command
“"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0;\bin\nvcc.exe"
-gencode=arch=compute_61,code=\"sm_61,compute_61\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -x cu  -I\include -IC:\opencv_3.0\opencv\build\include -I..\..\include -I..\..\3rdparty\stb\include -I..\..\3rdparty\pthreads\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0" -I\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0" -I\include -I\include -I\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0" -I\include     --keep-dir x64\Release -maxrregcount=0  --machine 64 --compile -cudart static     -DOPENCV -DCUDNN_HALF -DCUDNN -D_TIMESPEC_DEFINED -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_CRT_RAND_S -DGPU -DWIN32 -D_CONSOLE -D_LIB -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc140.pdb /FS /Zi  /MD " -o x64\Release\activation_kernels.cu.obj "D:\darknet-master\src\activation_kernels.cu"”
exited with code 1

I think the correct path is somewhat like "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\nvcc.exe". How could this happen?

I've tried to remove "compute_75,sm_75" in CUDA C/C++ -Device, or use "compute_61,sm_61" but still 11 MSB3721.

Please teach me how to fix these problems! Thanks a lot.

system: win10 18363.778, gpu: gtx 1070 (laptop), driver: 445.87

1

1 Answers

1
votes

enter image description here Problem solved! I just checked my path edit window and found the semicolon here.

Now my compiling is completed.