I installed clang-18 through brew install llmv on my macos 14.5 macbook with M3 chip.
(Unfortunately, currently Xcode has clang-15 only.)
However,
/opt/homebrew/Cellar/llvm/18.1.7/bin/clang-18 test.cpp -o test.out
generates errors starting with
Undefined symbols for architecture arm64:
“std::__1::locale::use_facet(std::__1::locale::id&) const”, referenced from:
std::__1::ctype const& std::__1::use_facet[abi:ne180100]std::__1::ctype<char>(std::__1::locale const&) in test-6f49c2.o
and ending with “error: linker command failed with exit code 1 (use -v to see invocation)”.
How can I fix it? (Brew install didnt generate any “make” app.)
test.cpp is just
#include <iostream>
int main() {std::cout << "Hello World!"; return 0;}