Tuesday, April 16, 2019

windows 7 - How can I set up an environment variable to work with TCC?


I am trying to set up TCC on Windows 7, but I can't seem to make it work dynamically from cmd


To be able to invoke the compiler from everywhere on your computer by
just typing "tcc", please add the directory containing tcc.exe to your
system PATH.

So I changed my environment variable that said "Path" from:



C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\



To:



C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; C:\compilers\tcc\tcc.exe



But when I open cmd, it still says that "tcc" is not a recognized command.


Answer



You have added the location to the .exe file named tcc.exe in your path. What you should do is add the location of the folder containing the tcc.exe file. So in your case the environmental path variable should be like this



C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\compilers\tcc



Assuming that your tcc.exe file is in the folder is C:\compilters\tcc


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...