繁体   English   中英

我可以在 mac 上使用 textedit 作为文本编辑器来编写 c 程序吗?

[英]Can I use textedit on mac as the text editor for writing c program?

我正在尝试学习如何在 mac 上仅使用文本编辑器和终端进行编程。 I was trying to use textEdit as text editor and I even changed the format to plain text so that it doesn't use the rtf format but even after saving it with.c extension, each time i use the gcc hello.c -o main终端上的命令显示:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

是因为我们不能为此目的使用 textEdit 吗? 如果是这样,为什么我们不能使用它?

问题不在于 TextEdit 没有正确保存文件,而是您似乎没有正确安装编译器。 尝试从 Mac App Store 安装 XCode 及其命令行工具。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM