哪里可以找到__sync_add_and_fetch_8? [英] Where to find __sync_add_and_fetch_8?

查看:81
本文介绍了哪里可以找到__sync_add_and_fetch_8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用__sync_add_and_fetch时得到了错误:

I got errors when trying to use __sync_add_and_fetch:

test8.cpp:(.text+0x90e): undefined reference to `__sync_add_and_fetch_8'
collect2: ld returned 1 exit status

请请告知如何纠正这一点。

Please kindly advise how to rectify this.

规格:
GCC / G ++ 4.4.1
GNU / Linux的2.6.32 SMP的i686

Specs: GCC/G++: 4.4.1 GNU/Linux 2.6.32 SMP i686

非常感谢!

在除了提供答案,我们可以使用-march = i586的或者-march = i686的成功联系起来。

In addition to the answer provided, one can use -march=i586 or -march=i686 to link successfully.

请注意:这需要GCC / G ++ 4.1.x版及以上

Note: This requires GCC/G++ 4.1.x and above!

推荐答案

这功能不支持所有x86架构。尝试指定您的体系结构,如 - 与拱=的Pentium4

That function is not supported on all x86 architectures. Try specifying your architecture, such as --with-arch=pentium4.

这篇关于哪里可以找到__sync_add_and_fetch_8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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