在哪里可以找到__sync_add_and_fetch_8? [英] Where to find __sync_add_and_fetch_8?
本文介绍了在哪里可以找到__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
请告知如何纠正。
规格:
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架构都不支持此功能。请尝试指定您的架构,例如 - with-arch = 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屋!
查看全文