I want to use gcc on Windows, so someone gave me a MinGW folder. I put the D:\software\MinGW\bin\ folder in my PATH. But when I open a new CMD and type gcc, I get
'gcc' is not recognized as an internal or external command, operable program or batch file
However, when I type gcc.exe, it works.
So I read on this post that this may be related to my PATHEXT variable. However, I changed my PATHEXT system variable so that it matches exactly what is said in the answer, and I removed my PATHEXT user variable, but it didn't change anything, I still have to write gcc.exe instead of gcc.
The strange thing is, other programs like Java work without writing the .exe extension. It seems like this problem only impacts the executables inside the D:\software\MinGW\bin\ folder.
D:\> set PATH Path=D:\software\MinGW\bin;C:\Program Files\Python39\Scripts;C:\Program Files\Python39;D:\software\Perl64\bin;C:\Users\Jacopo\AppData\Roaming\ActiveState\bin;D:\software\VMWare\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D:\software\Node;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Microsoft VS Code\bin;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;D:\software\doxygen\bin;C:\xampp\mysql\bin;C:\Program Files (x86)\Gpg4win..\GnuPG\bin;D:\software\Git\cmd;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;D:\software\MiKTeX\miktex\bin\x64;D:\software\OpenSSL-Win64\bin;D:\software\Nmap;D:\software\Aliases;D:\software\MinGW\bin;D:\software\Ruby27-x64\bin;C:\Program Files\Java\jdk1.8.0_112\bin;C:\Program Files (x86)\Google\Chrome\Application;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D:\software\Git\cmd;D:\software\Node;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Java\jdk1.8.0_112\bin;C:\Program Files (x86)\Common Files\Oracle\Java;D:\software\Qt\Tools\mingw530_32\bin;D:\software\Qt\5.9.8\winrt_x86_msvc2917\bin;C:\Users\Jacopo\AppData\Roaming\Composer\vendor\bin;D:\software\Docker Toolbox;D:\software\Nmap;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
What did I do wrong?
Thank you for your help.
fsutil.exe file queryCaseSensitiveInfo C:\path\to\dir