Buliding llvm examples, /llvm/lib/Support/Mutex.cpp:53: undefined reference to `pthread_mutexattr_init'
问题 I'm attempting to follow the steps on http://llvm.org/docs/tutorial/LangImpl3.html to build the example. based on Building llvm examples #error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" Why am I getting "undefined reference to `dladdr'" even with -ldl for this simple program? I've ended up with the command clang++ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -std=c++11 -g -O3 toy.cpp `llvm-config --libs core --cppflags --ldflags` -o toy which is giving /usr