错误:
OS:Mac Mojave 10.14.6
gcc版本:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
我尝试构建以下代码
#include <iostream>
int main() {
std::cout << "hello world";
return 0;
}
每当我尝试使用指令时,都会出现以下错误。
clang: error: linker command failed with exit code 1 (use -v to see invocation)
但是我试图在Clion上建造,它有效
我从未安装过Xcode,这与问题有关吗?
我想知道为什么会这样!