VS2010编译器和cuda错误:链接规范与以前的“hypot”不兼容

发布于 2024-09-18 18:25:02 字数 457 浏览 3 评论 0原文

当我尝试在 64 位 Windows 7 上使用 VS 2010 在调试 64 位配置中构建我的项目时,我收到此错误以及其他两个错误。

error: linkage specification is incompatible with previous "hypot" in math.h line 161
error: linkage specification is incompatible with previous "hypotf" in math.h line 161
error: function "abs(long long)" has already been defined in math_functions.h line 534

我在 32 位版本中没有收到这些错误。此外,64 位构建可以在 VS2008 中运行。是否有适当的解决方案来解决此问题,或者我应该等到 nvcc 支持 VS 2010 编译器?

When I try to build my project on a 64 bit Windows 7 using VS 2010 in Debug 64 bit configuration I get this error along with two other errors.

error: linkage specification is incompatible with previous "hypot" in math.h line 161
error: linkage specification is incompatible with previous "hypotf" in math.h line 161
error: function "abs(long long)" has already been defined in math_functions.h line 534

I do not get these errors in the 32 bit build. Also, the 64 bit build worked in VS2008. Is there a proper work around to this problem or should I just wait till nvcc supports VS 2010 compiler?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

眼角的笑意。 2024-09-25 18:25:03

为了获得 VS 2010 的 CUDA 支持,我们进行了一些尝试(链接文本),但我所看到的对 VS 2010 的唯一官方支持是 Parallel Nsight 1.5,它目前可作为候选版本从 NVIDIA 网站获得。从一些注释来看,奇怪的是,它似乎仍然需要 Visual Studio 2008 编译器才能运行,只需正确更新 cuda.targets、cuda.xml 等文件。

同时要检查的一件事是您链接到的 lib 文件,您链接到的是 32 位还是 64 位文件?这可能是你问题的根源。

There have been a few attempts to get VS 2010 support with CUDA (link text) but the only official support that I have seen for VS 2010 has been in Parallel Nsight 1.5, which is currently available as a Release Candidate from NVIDIA's website. From some of the notes, it strangely seems as though it will still require the Visual Studio 2008 compiler to run, just with the properly updated cuda.targets, cuda.xml, etc files.

One thing to check in the meantime though is the lib files you are linking to, are you linking to the 32 or 64 bit files? That could be the source of your issues.

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