I have installed Cygwin on my system. But when I try to use the gcc
command it says:
bash: gcc: command not found
Can anyone provide me the solution, please?
To get the Cygwin installer, go to the Cygwin install web page: https://cygwin.com/install.html. You need to download the setup-x86_64.exe file, see the figure 1 for it's location within the download page. Download and run the setup-x86_64.exe file.
Operation Modes. The MSYS2 and CYGWIN can be used with different operation modes: You can use them together with MinGW to build Windows-native software. You can use them together with any other compiler to build Windows-native software, even with Visual Studio.
In my installation there was no generic gcc
command either, so I made a symlink for it:
cd /usr/bin
ln -s i686-pc-cygwin-gcc-3.4.4.exe gcc
Now check if it worked by doing which gcc
which should give you /usr/bin/gcc
and then gcc
should give you gcc: no input files
. Note that your version of i686-pc-cygwin-gcc-3.4.4.exe may be different. Check in /usr/bin for it.
Maybe during installation of Cygwin you have not selected gcc, gdb and make packages.
I had the same problem and it was resolved after I selected above-mentioned packages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With