VS2010编译器和cuda错误:链接规范与之前的“hypot”不兼容;
当我尝试在 64 位 Windows 7 上使用 VS 2010 在调试 64 位配置中构建我的项目时,我收到此错误以及其他两个错误。
错误:链接规范与 math.h 第 161 行中先前的“hypot”不兼容 错误:链接规范与 math.h 第 161 行中先前的“hypotf”不兼容 错误:函数“abs(long long)”已在 math_functions.h 第 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,VS2010 中对此进行了更改:
不确定 abs() 错误,行号看起来错误。 math_functions.h 标头不再与 VS2010 兼容,必须做出一些改变。回顾是否仍然需要 #include math.h,它应该在功能上被 Cuda 取代。在他们解决问题之前,破解标题将是解决问题的另一种方法:
Yes, this was changed in VS2010:
Not sure about the abs() error, the line number looks wrong. The math_functions.h header is no longer compatible with VS2010, something is going to have to give. Review the need to still have to #include math.h, it ought to be functionally replaced by Cuda. Hacking the header would be another way to get past the problem until they fix it: