Не удалось скомпилировать cpp «hello world» в моем OSX

Я написал программу hello world на своем Mac, но когда я ее скомпилировал, компилятор выдает ошибку:

Неопределенные символы для архитектуры x86_64: "std :: __ 1 :: locale :: use_facet (std :: __ 1 :: locale :: id &) const", на который ссылаются из: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, unsigned long) в endian0-654ab7.o "std :: __ 1 :: ios_base :: getloc () const", по ссылке из: std :: __ 1: : basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, unsigned long) в endian0-654ab7.o "std :: __ 1 :: basic_string, std :: __ 1: : allocator> :: __ init (unsigned long, char) ", на который ссылается: std :: __ 1 :: ostreambuf_iterator> std :: __ 1 :: __ pad_and_output> (std :: __ 1 :: ostreambuf_iterator>, char const *, char const * , char const *, std :: __ 1 :: ios_base &, char) в endian0-654ab7.o "std :: __ 1 :: basic_string, std :: __ 1 :: allocator> :: ~ basic_string ()", по ссылке из: std :: __ 1 :: ostreambuf_iterator> std :: __ 1 :: __ pad_and_output> (std :: __ 1 :: ostreambuf_iterator>, char const *, char const *, char const *, std :: __ 1 :: ios_base &, char) в endian0- 654ab7.o "std :: _ _1 :: basic_ostream> :: sentry :: sentry (std :: __ 1 :: basic_ostream> &) ", на который ссылается: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1: : basic_ostream> &, char const *, long без знака) в endian0-654ab7.o "std :: __ 1 :: basic_ostream> :: sentry :: ~ sentry ()", на который ссылается: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, unsigned long) в endian0-654ab7.o "std :: __ 1 :: cout", на который ссылается: _main in endian0-654ab7 .o "std :: __ 1 :: ctype :: id", на который ссылаются из: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, long без знака) в endian0-654ab7.o "std :: __ 1 :: locale :: ~ locale ()", на который ссылаются: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, unsigned long) в endian0-654ab7.o "std :: __ 1 :: ios_base :: __ set_badbit_and_consider_rethrow ()", на который ссылаются из: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, unsigned long) в endian0-654ab7.o "std :: __ 1 :: ios_base :: clear (unsigned int)", на который ссылается: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, unsigned long) в endian0-654ab7.o "std :: terminate ()", на который ссылаются из: ___clang_call_terminate в endian0-654ab7 .o "___cxa_begin_catch", на который ссылаются из: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, char const *, unsigned long) в endian0-654ab7.o ___clang_call_terminate в endian0-654ab7.o "___cxa_end_catch", на который ссылаются из: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, символьный констант *) в формате без знака endian0-654ab7.o "___gxx_personality_v0", на который ссылаются из: std :: __ 1 :: basic_ostream> & std :: __ 1 :: __ put_character_sequence> (std :: __ 1 :: basic_ostream> &, символ const *, длинная строка без знака) в endian0- 654ab7.o std :: __ 1 :: ostreambuf_iterator> std :: __ 1 :: __ pad_and_output> (std :: __ 1 :: ostreambuf_iterator>, char const *, char const *, char const *, std :: __ 1 :: ios_base &, char) в endian0-654ab7.o Информация об отмене исключения Dwarf (__eh_frame) в endian0-654ab7.o ld : символ (ы) не найден для архитектуры x86_64 clang: ошибка: сбой команды компоновщика с кодом выхода 1 (используйте -v для просмотра вызова)

Это программа:

#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    cout<< "hello world";
    return 0;
}

Ответы на вопрос(1)

Ваш ответ на вопрос