#64·c4

在 macOS 中的 gcc 编译错误: 'main' 的第一个参数(参数个数)必须是 'int' 类型

作者: yinsongbj创建于 2021年3月15日更新于 2021年9月24日

我在 macos 10.15 上构建 c4 时出现错误 c4.c:333:5: error: 'main' 的第一个参数(参数数量)必须是 int 类型 int main(int argc, char **argv) 我的 gcc 版本 gcc -v 配置选项:--prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang 版本 12.0.0 (clang-1200.0.32.29) 目标:x86_64-apple-darwin20.2.0 线程模型:posix 已安装目录:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin