C语言 你如何在atom编辑器中编译ac程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38462298/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you compile a c program in atom editor
提问by Will Shepard
I downloaded atom a couple of days ago and I can't seem to find the right package or where and how you compile the program. does anyone know?
几天前我下载了 atom,但似乎找不到正确的包,也找不到编译程序的位置和方式。有人知道吗?
采纳答案by mame98
Atom is "simply" a Text editor that is not able to compile anything. If you use a Makefile, then there are a few add-ons for building targets via key bindings.
Atom“只是”一个不能编译任何东西的文本编辑器。如果您使用 Makefile,则有一些附加组件可用于通过键绑定构建目标。
If not, open a terminal and use the C compiler on your system. On Linux/Unix machines you probably want to use gcc:
如果没有,请打开终端并在您的系统上使用 C 编译器。在 Linux/Unix 机器上,你可能想使用 gcc:
gcc <your_source>.c -o <output_name>
EDIT
编辑
Or take a look at This Package
或者看看这个包
回答by JerryGoyal
Now, it's possible to run and compile (also debug) Cand C++program from within atom editor. Install gpp compilerpackage in atom editor.
现在,可以从 atom 编辑器中运行和编译(也调试)C和C++程序。在 atom 编辑器中安装gpp 编译器包。
Prerequisites:
Windows:
You'll need to install MinGWand add it to your system PATH.
先决条件:
Windows:
您需要安装MinGW并将其添加到您的系统 PATH。
Mac:
You'll need to install XCode.
Mac:
您需要安装XCode。
Linux:
The GNU Compiler Collection may come with your distribution. Run which gcc g++to find out.
Linux:
GNU Compiler Collection 可能随您的发行版一起提供。跑which gcc g++过去一探究竟。
To compile and run:
F5To debug:
F6
编译和运行:
F5调试:
F6
回答by user10575710
here's a link for atom gnu gcc compiler-- https://atom.io/packages/gpp-compiler1. download it 2. place the file in atom's package folder 3. press F5 on atom editor to RUN n Compile your file.
这是 atom gnu gcc 编译器的链接-- https://atom.io/packages/gpp-compiler1. 下载它 2. 将文件放在 atom 的包文件夹中 3. 在 atom 编辑器上按 F5 运行 n 编译您的文件。
it will open text.ext as a output.
它将打开 text.ext 作为输出。

