1

I have installed the g++ compiler on my PC at my work place, downloaded from https://osdn.net/projects/mingw/releases/ here. I've also set the system path variable, but when I try to compile my code in command prompt, it shows the message that g++ is not recognized as an internal command. I have Windows 10 on my home PC and I followed the exact process to install g++ and my code runs smoothly there, but I'm facing this issue on my working PC. Any help would be appreciated. Thank you.

8
  • 2
    What directory has g++ been installed to? Have you tried running the command line from that directory? I know you said you updated your path but I've had similar issues that was solved this way.
    – Jon
    Commented Jan 29, 2019 at 4:35
  • 1
    I have installed g++ to C:\MinGW\bin, and I just noticed that if I paste my code file there and then through cmd access the bin folder and try to compile the code, it does perfectly. Commented Jan 29, 2019 at 7:49
  • Did you close and re-open your IDE or DOS box? In Window's, it won't pick up the new path until you re-launch it. Such things are assigned at process start & globally changing them afterwards does not affect currently running processes.
    – Mawg
    Commented Jan 29, 2019 at 8:03
  • 1
    @Mawg I tried restarting my PC, but it didn't help. Commented Jan 29, 2019 at 8:13
  • I guess that compiling from the command line is tying to keep things simple in order to test. But, since you intend to use an IDE anyway (you do, don't you?), why not start that as most let you specify where the build tools are. OR - must it be g++? If you install MS Visual Studio, that should sort of the paths for you. Can you tell us what oyu intend to develop? Command line .exe? Windows GUI programs? Something else?
    – Mawg
    Commented Jan 29, 2019 at 8:18

0

You must log in to answer this question.

Browse other questions tagged .