dimanche 29 novembre 2020

Unable to compile with Clang using cc command. What am I missing?

I am using the new M1 MacBook Pro and I am setting up my development environment. I have installed gdb using homebrew, though I am unable to compile using cc. What software am I missing?

Note: I do not want to use gcc/g++, I want to use Clang specifically. See below for an example of the errors I receive with compiling with Clang.

% cc test.cpp                              
Undefined symbols for architecture arm64:
  "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
      std::__1::ctype<char> const& std::__1::use_facet<std::__1::ctype<char> >(std::__1::locale const&) in test-31f101.o
  "std::__1::ios_base::getloc() const", referenced from:
      std::__1::basic_ios<char, std::__1::char_traits<char> >::widen(char) const in test-31f101.o
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from:
...
...
...
...
A lot more errors...

Aucun commentaire:

Enregistrer un commentaire