[英]after the installation via MacPorts of gcc45, how can I use it to build C language on my Mac?
The following html link contains all the relevant bash command line records of the installation process.以下 html 链接包含安装过程的所有相关 bash 命令行记录。 Thank you for help!
谢谢你的帮助!
I didn't use XCode through I know Xcode will make it easier!我没有使用 XCode,因为我知道 Xcode 会让它更容易! I use an Air, memory of 4GB currently.
我目前使用的是 Air,内存为 4GB。 If this won't work easily I probably will quit learning C or run and compile C on Windows.
如果这不容易奏效,我可能会停止学习 C 或在 Windows 上运行和编译 C。 :(
:(
You command-line output indicates rather clearly that you aren't telling gcc
what to compile, so it's throwing its hands up in exasperation:你的命令行输出相当清楚地表明你没有告诉
gcc
编译什么,所以它愤怒地举起了手:
$ gcc
i686-apple-darwin10-gcc-4.2.1: no input files
You'll need to specify the file you're compiling.您需要指定正在编译的文件。 Better yet, use an IDE, like Xcode.
更好的是,使用 IDE,例如 Xcode。
< Shrug > What do you want us to say? <耸肩>你想让我们说什么?
Obviousy Macports is trying to build/install gcc but it can't without a compiler. Obviousy Macports 正在尝试构建/安装 gcc,但它不能没有编译器。 Yes gcc can be built without a preexisting compiler , but good luck and why?
是的 gcc 可以在没有预先存在的编译器的情况下构建,但祝你好运,为什么? Especially when XCode is a free download , click click let it start and a little while later it's done.
特别是当 XCode 是免费下载的时候,点击 click 让它开始,稍后它就完成了。 At that point as pointed out elsewhere, gcc, g++ will work, but it's not actually gcc but clang in disguise.
那时正如其他地方所指出的那样,gcc、g++ 将起作用,但它实际上不是 gcc,而是伪装的叮当声。
If you want, you can use macports or brew or whatever later if you really want to, but again why?如果你愿意,你可以使用 macports 或 brew 或者以后如果你真的愿意,但为什么? For programs that only work using gcc extensions?
对于仅使用 gcc 扩展工作的程序? Doubt it.
怀疑。 You just want ac/c++ compiler.
你只想要 ac/c++ 编译器。 If you ever want to do programs for the Mac or IPhone, you need XCode anyway, gcc won't do.
如果你想为 Mac 或 iPhone 编写程序,无论如何你都需要 XCode,gcc 不会。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.