How to get atom able to build and debug C++ files?

hey ive recently started learning how to code with C++ and i would like to switch to atom since its a nice editor and works well but ive been having trouble getting it able to build the .cpp files so i can test them anyone here use atom and have it set up to build the code to test it?

I have a working Atom setup for C++ on Windows. I used Msys2 and then grabbed the gcc 6.1 package. If you want to use make files then use cmake, otherwise, you can use the packages linked here for simple building:

There might be, but why would you. Just compile with g++ source.cpp -o myfile -Wall -std=c99* or use a make file. in which case you would just type make in terminal every time. I do the latter.

EDIT: Disclaimer std=c99 was the standard used at my uni as that was the latest version on the servers. Use the latest supported version in your environment.

1 Like

Because linting is really helpful. Particularly when learning a language.

huh, at my uni on day 2 we were using make files on the linux boxes on campus to compile our programs.

But I see your point.

yeah i understand in the future i might prefer it like that but atm i like doing it in the editor :D

1 Like

But why not vim? 😝


i had a look at vim but i prefer how atom looks :D

cheers for this but linter-gcc always throws up errors while im typing

You need to configure it to find your g++ executable. Same for the compiler package. Like I said, I use Msys2 to obtain gcc.


Compiling c++ code with the C 99 standard....


oh kk well the compiler works fine just the linter :D


ah ty :D

whats the command to get gcc?

G++ is the c++ compiler, so you want the executable that's that.

if its not installed mingw-get install g++

oh got it funny thing is it was technically the first command i did :D
only lower case

Msys2 uses pacman, so you can use pacman to grab mingw or gcc as your needs dictate.

From the homepage you want steps 5 onwards:

so just installing the gcc one will work fine?

I made an edit.