0
내 컴퓨터에서 터미널을 사용하여 컴파일하려면 gcc main.cpp
명령을 사용하여 main.cpp라는 프로그램을 컴파일하려고합니다. 심지어는 올바른 방향으로 날을 가리키는Mac에서 터미널에서 컴파일 할 때 C++ 오류
// Example program
#include <iostream>
#include <string>
int main()
{
std::string name;
std::cout << "What is your name? ";
getline (std::cin, name);
std::cout << "Hello, " << name << "!\n";
}
이 어떤 도움을 주시면 더 좋구요 : 나는 다음과 같은 오류
undefined symbols for architecture x86_64:
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
_main in main-db0d6c.o
. . .
Dwarf Exception Unwind Info (__eh_frame) in main-db0d6c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
여기
프로그램입니다을 얻을. 이 오류 메시지를 읽는 방법을 이해하지 못하고 기본 프로그램을 실행하는 방법을 배우고 싶습니다.
컴파일하는 데 사용하는 명령을 표시 할 수 있습니까? – InternetAussie
g ++ ** 사용 안함 ** gcc. – CroCo
@InternetAussie, OP는 gcc main.cpp * – CroCo