Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"-bash: gcc: command not found" using cygwin when compiling c?

Tags:

I just installed the latest version of Cygwin ans for some reason when I try to compile code, it always flashes me this error:

-bash: gcc: command not

I also don't seem to have the gcc.exe that people are referring to and when I try installing stuff like mingw as suggested by other forum answers, it always gives me this error that ti couldn't install the repository.txt.... Looking for help on this matter!

like image 893
Belphegor Avatar asked Sep 06 '14 23:09

Belphegor


People also ask

How do I find gcc version in Cygwin?

Once setup is finished, run Cygwin again, and type "g++ -v" to confirm the GCC C++ compiler is installed. This should come up with some version information text.

What does gcc command not found mean?

If you get the bash: gcc: command not found error when using this command, the GCC tool is not installed correctly.


2 Answers

You can install gcc by running setup-x86.exe or setup-x86_64.exe again. The gcc package is in the Devel category:

enter image description here

like image 128
David L. Avatar answered Sep 16 '22 14:09

David L.


Then you must go to System properties, System variables, and append the path to "C:\cygwin64\bin" in PATH

like image 28
vinniyo Avatar answered Sep 16 '22 14:09

vinniyo