Visual Studio 2010 CUDA 4.0 链接器错误

发布于 2024-12-01 20:59:39 字数 1473 浏览 1 评论 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南渊 2024-12-08 20:59:39

这些符号看起来像 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文