r/learncpp • u/WhenRedditFlies • Jun 08 '20
Can't compile in command line
I try
g++ -o helloworld.exe helloworld.cpp
to compile a program, and windows gives me an error box saying "The application was unable to start correctly (0xc0000279). Click OK to close the application." I tried in powershell before that, wondering why no executable was appearing, then tried it in CMD to see if the behaviour was any different, and then I got that message.
I try using code blocks, and with clicking build and run it works fine - it compiles, runs and I see an executable, I run the executable myself and it comes up with the same error box.
I've tried reinstalling MinGW (which had no effect), not sure what to do after that.
Edit: using markdown properly on mobile
View all comments
Show parent comment
1
u/victotronics Jun 08 '20
Ok. Did you try my dot-slash suggestion? That is truly how you do thing on the commandline.
Other comment: I can easily imagine that something you compile in the commandline does not work by double clicking because it has no GUI linked into it.