Error MSB3721 in cuda 7.5 + visual studio professional 2012

HI all,

When I try to compile code I got such error:

Error1 error MSB3721: The command “-Xcompiler /wd4251,/wd4503 “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc.exe” -dlink -o C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\smat_cuda.device-link.obj -Xcompiler “/EHsc /W3 /nologo /O2 /Zi /MD " -L"C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\bin\” -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64” -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64" base.lib smat.lib cudart.lib cublas.lib curand.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -gencode=arch=compute_30,code=sm_30 --machine 64 “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\arange.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\diff.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\dot.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\copy.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\dropout.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\elemwise3.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\mask.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\rand.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\elemwise2.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\repeat.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\tile.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\transpose.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\reduce.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\reduce_x.cu.obj” “C:\Data\nbt3300-code\code\libs\smat\vcproj..\build\Release\obj\smat_cuda\reduce_y.cu.obj”" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\CUDA 7.5.targets 690 9 smat_cuda
Error 2 error LNK1181: cannot open input file ‘smat_cuda.lib’ C:\Data\nbt3300-code\code\libs\smat\vcproj\LINK smat_ext_demo
Error 3 error C2660: ‘cudnnSetPooling2dDescriptor’ : function does not take 8 arguments C:\Data\nbt3300-code\code\libs\smat\src\smat_cudnn\cudnn.cpp 759 1 smat_cudnn
Error 4 error C2065: ‘CUDNN_ADD_SAME_C’ : undeclared identifier C:\Data\nbt3300-code\code\libs\smat\src\smat_cudnn\cudnn.cpp 717 1 smat_cudnn

Any advise would be appreciated. Thanks in advance.

Your addition of -Xcompiler /wd4251,/wd4503 to the cuda compile command has not been done correctly. Remove this addition (wherever you made it) in the CUDA VS project settings.

Hi txbob,

Thanks for your help. The error MSB3721 is fixed after removing that addition. But other errors still exist:

IntelliSense: identifier “CUDNN_ADD_SAME_C” is undefined
IntelliSense: argument of type “void *” is incompatible with parameter of type “cudnnConvolutionBwdFilterAlgo_t”
IntelliSense: argument of type “int” is incompatible with parameter of type “cudnnTensorFormat_t”
IntelliSense: argument of type “int” is incompatible with parameter of type “cudnnNanPropagation_t”
error C2660: ‘cudnnSetPooling2dDescriptor’ : function does not take 8 arguments
error C2660: ‘cudnnConvolutionBackwardData’ : function does not take 10 arguments

The intellisense issues may not be actual problems.
THe two actual numbered errors seem to be a function of the code you are compiling. Since I have no idea what that is, I couldn’t comment, but likely there are errors in that code in the usage of those functions e.g. cudnnSetPooling2dDescriptor

Hi txbob,

Thanks very much, I will try to figure out the problem caused by the actual numbered errors as you suggested.