Visual Studio 2010 CUDA 4.0 链接器错误
有谁知道一种简单的方法来修复以下错误:
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutComparefe referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutDeleteTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutGetTimerValue referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutStopTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutStartTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutCreateTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutReadFilei referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutReadFilef referenced in function "int __cdecl ReadFile(struct Matrix *,char *)" (?ReadFile@@YAHPEAUMatrix@@PEAD@Z)
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutWriteFilef referenced in function "void __cdecl WriteFile(struct Matrix,char *)" (?WriteFile@@YAXUMatrix@@PEAD@Z)
我已经尝试将 lib 目录添加到:
C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\lib\x64
C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\CUDALibraries\common\lib\x64
任何帮助都值得赞赏
Does any one know an easy way to fix the followoing errors:
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutComparefe referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutDeleteTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutGetTimerValue referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutStopTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutStartTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutCreateTimer referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutReadFilei referenced in function main
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutReadFilef referenced in function "int __cdecl ReadFile(struct Matrix *,char *)" (?ReadFile@@YAHPEAUMatrix@@PEAD@Z)
1>matrixmul.cu.obj : error LNK2019: unresolved external symbol __imp_cutWriteFilef referenced in function "void __cdecl WriteFile(struct Matrix,char *)" (?WriteFile@@YAXUMatrix@@PEAD@Z)
I've already tried adding the lib directories in:
C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\lib\x64
C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\CUDALibraries\common\lib\x64
Any help is apreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些符号看起来像 CUDA SDK 中包含的“cutil”库中的函数,因此您应该确保 Visual Studio 设置为链接到
cutil.lib
。Those symbols look like functions from the "cutil" library which is included with the CUDA SDK, so you ought to make sure that Visual Studio is set up to link against
cutil.lib
.