VS2010编译器和cuda错误:链接规范与先前的“hypot”不兼容。 [英] VS2010 compiler and cuda error: linkage specification is incompatible with previous "hypot"

查看:2337
本文介绍了VS2010编译器和cuda错误:链接规范与先前的“hypot”不兼容。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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在32位构建中不会得到这些错误。此外,64位构建工作在VS2008。是否有适当的工作绕过这个问题,还是我只需等到nvcc支持VS 2010编译器?

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?

推荐答案

很少尝试通过CUDA获取VS 2010支持(链接文本),但我看到的唯一的官方支持VS 2010已经在Parallel Nsight 1.5,目前可作为版本候选人从NVIDIA的网站。从一些笔记,它奇怪地似乎仍然需要Visual Studio 2008编译器运行,只是与正确更新的cuda.targets,cuda.xml等文件。

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.

在此期间检查的一件事是,你链接到的lib文件,你链接到32或64位文件?这可能是您的问题的根源。

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.

这篇关于VS2010编译器和cuda错误:链接规范与先前的“hypot”不兼容。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆