mingw path in environment variable on windows10 - windows

I am trying to add a mingw compiler in windows on qtcreator and i have done what the internet has said, add the path to system environment variable. C:\Qt\5.15.0\mingw81_64\bin is the path i used(no spaces) but when i tried to do a gcc -version in cmd, i get
'gcc' is not recognized as an internal or external command,
operable program or batch file.
setpath gives me
C:\>set path
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;...C:\Program Files\CMake\bin;C:\Qt\5.15.0\mingw81_64\bin;...
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
What do i do to fix this?

Can you check it really exists there by running:
DIR C:\Qt\5.15.0\mingw81_64\bin\gcc.exe
If it's not there then try
DIR C:\Qt\5.15.0\mingw81_64\bin\*gcc.exe
to see if you have something like x86_64-w64-mingw32-gcc.exe, which is what you should use then instead.

Related

windows 10 cmd, what determines which files can be accessed without a path?

in command line examples in windows 10 files seem to just be pulled from thin air? how do i define that?
commands like
gcc --v
or
link /subsystem:console /nodefaultlib /entry:main hello.obj
refer to downloaded files, but if i try to download them and run the identical command i will get an error:
gcc : The term 'gcc' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct
and try again. At line:1 char:1
why? am i missing something?
Everything in $ENV:Path can be called without specifying a path.
If not, you must specify the path (even the current directory).

I was trying to run yarn,but am getting this issue.Yarn is installed but cant even access the version

yarn --version
The system cannot find the path specified.
Error: JAVA_HOME is incorrectly set.
Please update C:\Users\shriy\Downloads\hadoop-3.1.0\etc\hadoop\hadoop-env.cmd
'-Dhadoop.log.dir' is not recognized as an internal or external command,
operable program or batch file.
Your java environment path must not contain space. The solution is as follows:
In the cmd line, charge the directory that contain the jdk (in my case C:\Program Files\Java\jdk1.8.0_73).
execute the following line "for %I in (.) do echo %~sI" to display the short name of your installed jdk (in my case C:\PROGRA~1\Java\JDK18~1.0_7)
in the file "hadoop-env.cmd", change the line "JAVA_HOME=%JAVA_HOME%" with "JAVA_HOME=C:\PROGRA~1\Java\JDK18~1.0_7".
run again the file "hadoop-env.cmd" and it will work correctly.

Why does the gcc command not work on Windows command line, but works on Git Bash?

I have added C:\MinGW\bin to my user path, and I made sure that gcc.exe exists in the C:\MinGW\bin folder.
When I run this I get:
gcc -- version
'gcc' is not recognized as an internal or external command,
operable program or batch file.
But when I run it on Git Bash, the command executes properly. Does anyone know why this is happening?
CMD.exe may still have your old %PATH% environment variable value.
If you've updated it in the Environment Variables tab under Computer / Properties, you might be able to close and re-open the command prompt to get the new environment variable value.
See How do you add a Windows environment variable without rebooting? on Server Fault.

''Command' is not recognized as a internal or external command, operable program or batch file

I am compiling spice 3f5 on Windows 10.
C:\Users\myname\Documents\spice\spice3f5> msc51
C:\Users\myname\Documents\spice\spice3f5>set CL=/Gt64 /Os /FPi87 /AL /G2 /W2
C:\Users\myname\Documents\spice\spice3f5>cd src
C:\Users\myname\Documents\spice\spice3f5\src>command /c msc51.bat
'command' is not recognized as an internal or external command,
operable program or batch file.
What do I need to do to get the cmd to recognize command?
Or does this have to do with the code not compiling correctly?
I have seen other questions and they talk about paths and something about setting and environment. Now I'm no pro I just want to compile spice 3f5.
The ComSpec variable typically contains the current shell on Windows. In order to make the code most reusable, replace command with %ComSpec%.

Jmeter error with version even if PATH are set

Getting this error message below.
' java -version 2>&1 | findstr /i "version" is not recognized as an internal or external command,
operable program or batch file.
Not able to find Java executable or version. Please check your Java Installation.
errorlevel=2
I have these in PATH but still error is still appear. Any idea?
PATH is already set to
C:\Program Files (x86)\Java\jdk1.8.0_45\bin\;C:\Program Files (x86)\Java\jre1.8.0_45\bin\;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files (x86)\Java\jre7\bin\java.exe
Your path is wrongly configured.
Define it correctly using:
setenv PATH=%PATH%;Full path to java bin folder
Ensure you put quote around path.
You say it's already define, are you sure there is a java in the defined place ?
Note you have 2 different versions of Java in path.
Issue is not with environment path as java path has been set correctly.
Issue was with broken variable and resolved by resetting broken ComSpec variable.
Run cmd as Admin and reset with command below.
setx ComSpec %SystemRoot%\system32\cmd.exe /m

Resources