Consider the following piece of code:
#include <atomic>
int main(void) {
std::atomic<double> aDouble;
aDouble = 6.0;
}
G++ compiles it just fine while clang++ produces the following:
clang++ -std=c++11 Main.cpp
/tmp/Main-d4f0fc.o: In function `std::atomic<double>::store(double, std::memory_order)':
Main.cpp:(.text._ZNSt6atomicIdE5storeEdSt12memory_order[_ZNSt6atomicIdE5storeEdSt12memory_order]+0x31): undefined reference to `__atomic_store_8'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Do they not link against the same standard library?
Aucun commentaire:
Enregistrer un commentaire