简体   繁体   中英

How do you compile a c program in atom editor

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?

Now, it's possible to run and compile (also debug) C and C++ program from within atom editor. Install gpp compiler package in atom editor.


Prerequisites:
Windows:
You'll need to install MinGW and add it to your system PATH .

Mac:
You'll need to install XCode .

Linux:
The GNU Compiler Collection may come with your distribution. Run which gcc g++ to find out.


To compile and run: F5

To debug: F6

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.

If not, open a terminal and use the C compiler on your system. On Linux/Unix machines you probably want to use gcc:

gcc <your_source>.c -o <output_name>

EDIT

Or take a look at This Package

here's a link for atom gnu gcc compiler-- https://atom.io/packages/gpp-compiler 1. download it 2. place the file in atom's package folder 3. press F5 on atom editor to RUN n Compile your file.

it will open text.ext as a output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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