开发者

Where to find __sync_add_and_fetch_8?

开发者 https://www.devze.com 2022-12-25 17:10 出处:网络
I got errors when trying to use __sync_add_and_fetch:开发者_如何学运维 test8.cpp:(.text+0x90e): undefined reference to `__sync_add_and_fetch_8\'

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.

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

Many thanks!

EDIT:

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

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消