Mingw can't compile

Feb 18, 2012 at 9:22pm
Okay... I installed the Mingw compiler and I can't run it for some reason.
Isn't the command 'g++ helloworld.cpp -o helloworld.exe' valid?

Apparently not, as it is not recognized as an internal or external command, operable program, or batch file.

Now I know I installed it. And in cmd I used 'cd C:\C++\' (the directory of my C++ practice files)

Please help, and don't tell me to use an IDE. When I worked with java I found it more fun to compile with .bat or cmd and I like the process. Thanks.
Feb 18, 2012 at 9:25pm
Are you trying to run it from the MinGW command line or the normal windows command line?
Feb 18, 2012 at 9:28pm
windows DOS prompt
Feb 18, 2012 at 9:29pm
It won't work from there. Run it from the MinGW command prompt.
Feb 18, 2012 at 9:30pm
Where is that? How do I find it?
Feb 18, 2012 at 9:32pm
The MinGW section of the Start menu or whatever windows calls that menu nowadays.

http://www.mingw.org/wiki/Getting_Started
Last edited on Feb 18, 2012 at 9:34pm
Feb 18, 2012 at 9:34pm
It only says "uninstall mingw-get"
Feb 18, 2012 at 9:37pm
Have you followed all the instructions in the http://www.mingw.org/wiki/InstallationHOWTOforMinGW and http://www.mingw.org/wiki/Getting_Started section? You should end up with something like this in your start menu.

Start Menu => Programs => Mingw => MinGW Shell
Last edited on Feb 18, 2012 at 9:38pm
Feb 18, 2012 at 9:43pm
Okay... everything is installed, what is the name of the MingGW command prompt?
Feb 18, 2012 at 10:27pm
Alright I figured it out! I had not installed MSYS! That's what I needed, thanks!
Feb 18, 2012 at 10:29pm
You can also just add the MinGW folder to your PATH variable and call mingw32-g++
Topic archived. No new replies allowed.