Talk:cpp/memory/shared ptr/atomic
From cppreference.com
- include <atomic>
shared_ptr<ClassType> ptr (new ClassType); atomic<shared_ptr<ClassType>> ptr2; atomic_store(&ptr2, ptr); auto ptr3 = atomic_load (&ptr2);
singleton.cpp:(.text+0x7f1): undefined reference to `__atomic_store_16' singleton.cpp:(.text+0x808): undefined reference to `__atomic_load_16'
Is there anybody here have idea about how to fix this compile error?