Talk:cpp/memory/shared ptr/atomic

shared_ptr ptr (new ClassType); atomic> ptr2; atomic_store(&ptr2, ptr); auto ptr3 = atomic_load (&ptr2);
 * 1) include

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?


 * Sounds like you're using gcc and missing the -latomic commandline switch. --Cubbi (talk) 23:13, 10 January 2015 (PST)