where is libatomic?
Posted: Sat Nov 02, 2019 12:13 am
I'm tying to compile something like this:
but I get
if I try to link with -latomic linker flag this fails too as there is no libatomic in the toolchain. Where is libatomic or how can I make use of std::atomic?
Code: Select all
#include <atomic>
static int test()
{
std::atomic<long long> x;
return x;
}
int main()
{
return test();
}
Code: Select all
c:/users/username/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: CMakeFiles/cmTC_bfb5d.dir/atomic_check.cpp.obj:(.literal._ZNKSt13__atomic_baseIxEcvxEv[std::__atomic_base<long long>::operator long long() const]+0x8): undefined reference to `__atomic_load_8'