Sunday 13 January 2013

GCC compiler collections for windows.

GCC is GNU Compiler Collection. It supports most of the programming language like C, C++, Java, Ada etc. But GCC is basically used in UNIX-like systems, Linux. But what if you want such an environment for Windows? Is there any replacement? Is there any way? That too open source and free? Yes!! There is.

MinGW stands for Minimalized GNU for Windows. It provides a complete open source tool for windows environment.It is the collection of all the compilers of GCC for windows platform. It don't need any 3rd party DLLs. It does uses some of DLLs which are inbuilt in windows OS. 


MinGW includes

  • A port of GNU Compiler Collection, including C, C++, Ada, Fortran compilers.
  • Assembler, linker, archive manager
  • A command line installer
  • A GUI wrapper for the command line.
Download. 
You can download latest MinGW for windows  download here. Its a sourceforge.net download.


For beginners, here is a small tutorial to how to use MinGW. 

How to compile a C++ executable file in MinGW environment. 

First, make sure you have installed the environment on your system from the above download link.

Now assuming that your directory of MinGW is c:\MinGW, and bin folder is situated in that directory, lets compile the cpp file. 

Open a command prompt window under Administrator privilege and set the current directory where you have saved .cpp file. You can do it by typing cd c:\MinGW\bin if you have saved that file in bin folder. 

Now type the following command g++ helloworld.cpp -o helloworld.exe . the -o represents the name of the output file. If not mentioned it outputs a file with the name a.cpp
If there is no error in your file, the file will run as per the codes. 

You can find complete set of instructions of using the MinGW here. 

It have options for pdf, html, or text files in different languages. If not sure which one to download, mention the language and your Cpu architecture in comments section below. I will find it for you. 

The official website of the project is http://www.mingw.org/ . You can get all the related documentation and how-to-install things at the website along with the source code and latest development news in the MinGW world. 

mb.
Open Source Revolution.

3 comments:

  1. I don't even understand how I finished up here, however I believed this post was good. I do not know who you are however certainly you are going to a famous blogger if you are not already. Cheers!
    Feel free to visit my site hvor meget kan jeg låne

    ReplyDelete
  2. Excellent read I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that: Thanks for lunch!
    local business data

    ReplyDelete
    Replies
    1. That's great to here. Its my pleasure some one gets benefit from my posts. :)

      Delete

Related Posts Plugin for WordPress, Blogger...