At work i use gcc in linux but at home i use windows so i need to figure out the way of using gcc in cmd of windows just like using gcc in linux terminal. Since i dont like to use IDE such eclipse and neatbeans.
i came to know three option
1> Use Cygwin package
2> Use MinGW
3> Use MSYS
Well among all of them i have chosen option of using Cygwin package because
- Cygwin is a collection of tools which provide a Linux look and feel environment for Windows.
- a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality.
Steps to install and configure cygwin :
- Download the Cygwin setup.exe program by clicking this direct setup.exe link.
- Run the setup.exe program. Accept the defaults until you reach the Select Your Internet Connection page. Select the option on this page that is best for you. Click Next.
- On the Choose Download Site page, choose a download site you think might be relatively close to you. Click Next.
- On the Select Packages page you select the packages to download. Click the + next to Devel to expand the development tools category. You may want to resize the window so you can see more of it at one time.
- Select each package you want to download by clicking the Skip label next to it, which reveals the version number of the package to download. At a minimum, select
- gcc-core: C compiler
- gcc-g++: C++ compiler
- gdb: The GNU Debugger
- make: the GNU version of the ‘make’ utility
Packages that are required by the packages you select are automatically selected as well.
- Click Next to connect to the download site and download the packages you selected, and click Finish when the installation is complete.
Now cygwin with gcc is installed on your windows system now to use gcc you can do following thing
7(a)> in your c drive you will find a cygwin folder inside that you will find Cygwin.bat file whenever you want to use gcc click on this bat file and use it
If you dont like to use this method then follow this method
7(b). Add the Cygwin compiler directory to your Environment path
- Open the Control Panel:
– On Windows XP select Start > Settings > Control Panel) and double-click System.
– On Windows 7, type var in the Start menu’s search box to quickly find a link to Edit the system environment variables.
- Select the Advanced tab and click Environment Variables.
- In the System Variables panel of the Environment Variables dialog, select the Path variable and click Edit.
- Add the path to the cygwin-directory\bin directory to the Path variable
- save this all setting
Now open cmd and write “bash” and use your gcc…!!
Search in this website
Find us on Facebook
Find us on stackoverflow
- Audio/video Recorder & player application based on MATLAB
- check dependency of your binary
- defination of all standard c programming language function
- Great Question-Answer on c programming
- know what your c code means
- Limition of c programming language
- List of all version of c programming language
- Online c compiler
- php freelancing work
- some more stuff on C programming language
- Volatile Keyword in Embedded System
- Write Android application in c language