I will show you how to install CYGWIN on Windows..
First of all what is CYGWIN??to quote from wikipedia
Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment. Thus it is possible to launch Windows applications from the Cygwin environment, as well as to use Cygwin tools and applications within the Windows operating context.
Installing CYGWIN from internet takes lot of time around 10-12 hours (depending upon internet speed) and there is around 22-23 g.b. of file that is downloaded if you are using full installation.But I required to use only compiler of C++, Java, Python, and other programming language..In C++ I have to write codes for Graphics and Networking..I could have used LINUX but due to heating and brightness problem in my laptop, I had to quit but I love LINUX..So I searched for an option and I found CYGWIN..
Download the file …It is of around 970 M.B and contains all the important things to run a code and also run code for graphics and networking
and extract it using 7 zip or Win Rar or any other decompressing software..Save the uncompressed folder to suppose
Now open the temp folder an run the setup.exe file and click on next until you find this screen
Select “Install from local directory“ option.Click on Next
and select the destination folder where you want to install it..remember it will be important when you set the path in Environment Variable..I had set it to “C:\cygwin64“..click on next
enter here the path where you have the folder that you have downloaded..in my case it was “E:\temp“
now go on clicking next-next (three or four times) and you will see there will be a window appearing where you will see what is installing..It can take around 15-20 minutes or more..so be patient..
after installation is complete there will be an icon of Cygwin64 Terminal that will be appearing on Desktop.double click on it and type “gcc“..It will give an error telling gcc command not found..now its time to set Environment Variable..Be very cautious while doing this otherwise this can cause many problems..
Open C drive there you will find cygwin64 folder..double click on that..there you will find bin folder..double click on that and click on top of window you will get the address..for me it is “C:\cygwin64\bin“..copy it..
Now click on windows button..from right side select Control Panel..In control panel select system..from left side click on Advanced System Settings..In its advanced tab you will see Environment Variable written..just click on that..A new window will appear..Under System Variables scroll down until you find Path written
Double click on path..now move till you find the last semicolon(;) or end and paste the copied path here..be sure that there is a separation between the previous path and new path by semicolon(;)
You have now successfully added the path..close the cygwin terminal and open it again..now type gcc and this time it will give you fatal error..no file found(if everything works correctly)..Voila!!you can now run C/C++/Python/JAVA/Ruby/Prolog etc code just you do it in LINUX
Write a simple hello world code and save it in C/C++ on desktop..you can move to desktop fro terminal by
cd Users/(your computer name)/Desktop
Note:-Remember LINUX is case sensitive so any error may lead to incorrect path
compile the code using
for C or
and run the code using
To run JAVA code download JRE from oracle and add its bin folder to environment variable just as procedure above and compile java code using
and run it using
Now for computer graphics code first of all enter
in cygwin terminal..if a new window appears then its ok otherwise you have to install XWin package from net..run the setup file again and click on next and this time chose “install from internet“..select a mirror and select XWin package (probably the last one) and install all by clicking on Default once..specify the path to where you have to install “C:\cygwin64“..and again use following
and run graphics code using
g++ filename.cpp -lGL -lglut -lGLU
in the new window that appeared..
Do ask if there is any problem or you find anything incorrect!!
I will be happy to help