gtest: Undefined symbols for architecture x86_64 error with clang++ and std::vector
问题 I downloaded the gtest 1.6, and compiled it with clang++. export CC=/usr/bin/clang export CXX=/usr/bin/clang++ configure make I got the libgtest.a, and I copied it into /usr/local/lib/libgtest_clang.a . When I tested with simple C++ code, everything works OK, however, when I tried to use vector in test code, I got these error messages in the build process. Compilation works fine. Undefined symbols for architecture x86_64: "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator