undefined reference to `__atomic_is_lock_free‘

1 编译错误

最近在linux下写程序时使用标准库std::atomic,其中使用到is_lock_free,链接时提示找不到__atomic_is_lock_free函数。

/usr/bin/ld: /mnt/e/git/cpp/test/cpptest/concurrent/.obj/atomic_test.o: in function `std::atomic<ObjectA>::is_lock_free() const':
atomic_test.cpp:(.text._ZNKSt6atomicI7ObjectAE12is_lock_freeEv[_ZNKSt6atomicI7ObjectAE12is_lock_freeEv]+0x1d): undefined reference to `__atomic_is_lock_free'
collect2: error: ld returned 

你可能感兴趣的:(编译错误,c++11,编译错误)