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/WhenRedditFlies Jun 08 '20
Sorry, I meant I found the executable in file explorer and double clicked on it. Also in windows to run a program you would do
start programinstead ofstart program.exe, you would do, for example,start chrometo open Google Chrome.