
Carsten Raas
----------------------------------------------------------------- Shared linking: # icpc -I /opt/boost/1.38/intel/include conftest.cpp -L /opt/boost/1.38/intel/lib -lboost_date_time
/opt/boost/1.38/intel/lib/libboost_date_time.so: undefined reference to `__sync_fetch_and_add_4' ----------------------------------------------------------------- Shared linking with gcc:
# g++ -I /opt/boost/1.38/intel/include conftest.cpp \ -L /opt/boost/1.38/intel/lib -lboost_date_time
/opt/boost/1.38/intel/lib/libboost_date_time.so: undefined reference to `__sync_fetch_and_add_4' collect2: ld returned 1 exit status -----------------------------------------------------------------
This is an internal function for gcc's atomics extensions. http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Atomic-Builtins.html Can you try adding -lgcc (IIRC; maybe lgcc_s?) to your link line? Looks like the more global problem is that boost_date_time is using this symbol, but was not linked against it at build time. It's a bit strange that your compiler isn't adding this implicitly though... Cheers, -tom