I Installed Atom and XCode a couple days ago, I downloaded gpp-compiler as a package to compile c++ code. I have tried to right click the tab and press f5 and f6 multiple times but I get absolutely nothing, was there something I missed?
What do you get when you type
which gcc g++ into the Terminal?
Is there a terminal on atom that I would type this into? If so, how would I go about opening it?
OS X has a program called Terminal, that provides you with access to the system’s command line. I don’t know where it is in modern installations, but it shouldn’t be hard to find.
Oh ok I’m dumb, it gave me /usr/bin/gcc and the next line /usr/bin/g++
Okay. There are a few possibilities.
- The key is getting intercepted (this seems unlikely, but it’s a possibility). You can open the Keybinding Resolver (
Packages -> Keybinding Resolver -> Toggle) and press f5 to see what comes up. The first result should be
gpp-compiler:compile. If it’s not at the top of the list and colored green, then that’s what’s wrong.
- The command is going off correctly, but the file isn’t saved as
gpp-compilerhas no idea what to do with it.
- The command is going off correctly and the file is of the correct type, but
gpp-compileris sending the wrong message. You can identify if this is happening by reconstructing the command that
gpp-compilershould be sending. The package has a lot of
debug()calls, and according to the code, each of those is sending information to the console. So you should be able to see in a decent amount of detail what’s being sent by opening the developer tools (
View -> Developer -> Toggle Developer Tools) and watching the messages that pop up after you hit the key. If you provide a screenshot of this, I can give you more information about what you’re seeing.
Yeah I’m really dumb, it was the combination of keys I was supposed to press, thank you so much!
I just wanted to humbly add my own dumb move here as well in case anyone else runs into the same problem. Remember that if you include a . in your file name gpp-compiler registers it as the beginning of the file extension. I had a file named checkpoint_7.4.cpp which registered as checkpoint_7 with file extension .4.cpp which naturally, gpp-compiler had no idea what to do with. No error message, just horrible silence. A cautionary tale indeed.