[求助】CUDA编译问题

menkeleev 2015-09-16 12:05:42
mac安装了CUDA toolkit和SDK,打算编译SDK里面的例程,在make的时候出现了以下错误

make
make -C src/3DFD/
/usr/include/stdio.h(274): error: attribute "deprecated" does not take arguments

/usr/include/stdio.h(389): error: attribute "deprecated" does not take arguments

2 errors detected in the compilation of "/tmp/tmpxft_00002a5e_00000000-4_3dfd.cpp1.ii".
make[1]: *** [obj/x86_64/release/3dfd.cu.o] Error 255
make: *** [src/3DFD/Makefile.ph_build] Error 2

gcc版本是4.9.3
sdk版本是cudasdk_2.3a

我把gcc版本改成4.2.1后错误变成
make
make -C src/3DFD/
couldn't understand kern.osversion `14.1.0'
couldn't understand kern.osversion `14.1.0'
couldn't understand kern.osversion `14.1.0'
/usr/local/cuda/bin/../include/math_functions.h(444): error: declaration is incompatible with "int __cuda___isinf(double)"
(387): here

/usr/local/cuda/bin/../include/math_functions.h(446): error: declaration is incompatible with "int __cuda___isnan(double)"
(392): here

求解em2
...全文
993 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
happy_yiyi 2015-10-26
  • 打赏
  • 举报
回复
LZ 问题解决了吗,我也是一样的问题不知道怎么继续安装

374

社区成员

发帖
与我相关
我的任务
社区描述
CUDA on Linux
社区管理员
  • CUDA on Linux社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧