我正在尝试使用Joe Stam编译以下代码(卷积方法,使用vs2005进行项目,我正在使用VS2010,但使用9.0引擎进行编译)
1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaEventDestroy @ 4在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> main.obj:错误LNK2001:未解决 外部符号_cudaEventDestroy @ 4 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaEventElapsedTime @ 12在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> main.obj:错误LNK2001:未解决 外部符号 _cudaEventElapsedTime @ 12 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaEventSynchronize @ 4在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> main.obj:错误LNK2001:未解决 外部符号 _cudaEventSynchronize @ 4 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaGetLastError @ 0在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaConfigureCall @ 32在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaEventRecord @ 8在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> main.obj:错误LNK2001:未解决 外部符号_cudaEventRecord @ 8 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaEventCreate @ 4在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> main.obj:错误LNK2001:未解决 外部符号_cudaEventCreate @ 4 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaMemset @ 12在函数“float _cdecl中引用 NaiveGlobalConvolution(unsigned char *,unsigned char *,unsigned int,unsigned int,unsigned INT,INT,INT)” (?NaiveGlobalConvolution @@ YAMPAE0IIIHH @ Z) 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 _cudaSetupArgument @ 12在函数“void _cdecl中引用 的 device_stub__Z28NaiveGlobalConvolutionKernelPhS_jjjf(无符号 char *,unsigned char *,unsigned int,unsigned int,unsigned int,float)“ (?__ device_stub__Z28NaiveGlobalConvolutionKernelPhS_jjjf @@ YAXPAE0IIIM @ Z) 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 ___ cudaRegisterVar @ 32在函数“void _cdecl中引用 _ STI _cudaRegisterAll_59_tmpxft_00000a3c_00000000_3_ConvolutionCudaFunctions_cpp1_ii_imgTex(无效)” (?的 STI _ _cudaRegisterAll_59_tmpxft_00000a3c_00000000_3_ConvolutionCudaFunctions_cpp1_ii_imgTex @@ YAXXZ) 1> ConvolutionCudaFunctions.obj:错误 LNK2019:未解析的外部符号 ___ cudaRegisterTexture @ 28在函数“void _cdecl
中引用
......还有很多其他错误......
1> Debug / ConvTest.exe:致命错误 LNK1120:35个未解决的外部
使用/ MDd代码生成和CUDA C / C ++运行时主机库。
如果我切换到/ MTd两者都是一样的。
这有什么问题?我尝试了32位和64位SDK,工具包是6
答案 0 :(得分:0)
32/64位sdks出现问题,我通过链接32位
解决了问题