Compiling with C++


#1

Hey everyone,
I’ve been trying to switch over to Atom for my C++ coding, but I have encountered some errors along the way. I first was getting the issue that the g++ compiler could not be spawned, but I have since figured that out. Now whenever I hit f5(or select “compile and run”) I get nothing. No errors, not output, just nothing. I looked at my key bindings so I know that those are working. the g++ compiler is installed correctly(I think) and I have tried opening it as an administrator as well, but to no avail. Hopefully this is a simple fix and I’m just being a rookie atom user. Any help would be much appreciated.


#2

How did you solve this?

the g++ compiler is installed correctly(I think) and I have tried opening it as an administrator as well, but to no avail.

You tried opening the compiler as an administrator? That doesn’t make much sense to me, since the compiler isn’t a program you keep open. It would make more sense if you meant to say that you opened Atom as an administrator.

What happens when you open the command line and type g++?


#3

I solved it by placing the C:/MinGW/bin into my path (I was leaving out the /bin) prior to this. And yes sorry, that was a grammar error on my part, I meant opening atom in administrator not the compiler.

When typing g++ into my command I get “fatal error: no input files” so I can only imagine it must be installed correctly


#4

And I always ask if I’m not crystal clear on the meaning of a sentence, because sometimes someone’s doing something unexpected. :slight_smile:

When typing g++ into my command I get “fatal error: no input files” so I can only imagine it must be installed correctly

Yes, that’s good. Frequently when someone can’t access an external program from Atom (such as in dozens of threads on here about running Python scripts), it’s because the compiler or whatever hasn’t been installed correctly because, for some reason, tools created by software developers for software developers often assume that the people installing them will have broad general mastery of their computers and be familiar with command-line activities.