On 7 August 2014 10:10, 纪明 wrote: > Hi all, > > I have gcc 4.9.0 installed in my system. When I tried to run an > executable, I got the following error: > > libMyLib.so: undefined symbol: __atomic_store > > Then I tried to find this symbol in libstdc++.so with the following command: > > [workspace]$ nm -DC /usr/lib64/libstdc++.so | grep atomic > 000000348e07bdb0 T __gnu_cxx::__atomic_add(int volatile*, int) > 000000348e05c0c0 T > std::__atomic0::atomic_flag::test_and_set(std::memory_order) > 000000348e05c120 T std::__atomic0::atomic_flag::clear(std::memory_order) > 000000348e05c0c0 T > std::__atomic0::atomic_flag::test_and_set(std::memory_order) volatile > 000000348e05c120 T std::__atomic0::atomic_flag::clear(std::memory_order) > volatile > 000000348e05c1b0 T __atomic_flag_for_address > 000000348e05c180 T __atomic_flag_wait_explicit > 000000348e05c170 T atomic_flag_clear_explicit > 000000348e05c160 T atomic_flag_test_and_set_explicit > > > There is no __atomic_store indeed. Did I miss some flags when installing > gcc? You didn't say what flags you used when installing it - or even what platform you installed it on - are we supposed to guess? This usually means you are on a target without atomic operations, so you need to link to GCC's libatomic.so support library.