Categories: C Programming Languages
In other languages:
Download DOSBox for free. An Open Source DOS emulator to run old DOS games. A DOS database program. Tablet but how do I get them onto the dosbox c.
Español: compilar un programa en C usando el compilador GNU (GCC), Italiano: Compilare un Programma C Utilizzando il Compilatore GNU GCC, Português: Compilar um Programa Usando o Compilador GNU (GCC), Русский: скомпилировать программу C, используя компилятор GNU Compiler (GCC), Deutsch: Ein C Programm mit dem GNU Compiler (GCC) kompilieren, Bahasa Indonesia: Mengompilasi Program C dengan GNU C Compiler (GCC), Français: compiler un programme en C avec le compilateur GNU GCC, ไทย: Compile โปรแกรมภาษา C ด้วย GNU Compiler (GCC), Nederlands: Een C programma compileren met de GNU compiler, العربية: ترجمة برنامج بلغة سي باستخدام مترجم جي إن يو, Tiếng Việt: Biên dịch chương trình C bằng GNU (GCC), 中文: 使用GNU编译器(GCC)编译C程序
- Edit
- Send fan mail to authors
Active4 years, 1 month ago
I am looking for free tools to compile C programs on Windows 7. I've always compiled C code on Ubuntu using gcc in the past. So, how can I compile C code on Windows 7? Please teach me. :)
joce5,7251515 gold badges4747 silver badges6666 bronze badges
Mohd IsaMohd Isa
closed as off-topic by bummi, meagar♦Jul 15 '15 at 13:53
This question appears to be off-topic. The users who voted to close gave this specific reason:
- 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – bummi, meagar
![Compile c program online Compile c program online](/uploads/1/2/6/0/126057915/275528372.jpg)
6 Answers
MinGW uses a fairly old version of GCC (3.4.5, I believe), and hasn't been updated in a while. If you're already comfortable with the GCC toolset and just looking to get your feet wet in Windows programming, this may be a good option for you. There are lots of great IDEs available that use this compiler.
Edit: Apparently I was wrong; that's what I get for talking about something I know very little about. Tauran points out that there is a project that aims to provide the MinGW toolkit with the current version of GCC. You can download it from their website.
However, I'm not sure that I can recommend it for serious Windows development. If you're not a idealistic fanboy who can't stomach the notion of ever using Microsoft software, I highly recommend investigating Visual Studio, which comes bundled with Microsoft's C/C++ compiler. The Express version (which includes the same compiler as all the paid-for editions) is absolutely free for download. In addition to the compiler, Visual Studio also provides a world-class IDE that makes developing Windows-specific applications much easier. Yes, detractors will ramble on about the fact that it's not fully standards-compliant, but such is the world of writing Windows applications. They're never going to be truly portable once you include
windows.h
, so most of the idealistic dedication just ends up being a waste of time.200k3838 gold badges403403 silver badges487487 bronze badges
It's a full IDE, with powerful debugging tools, syntax highlighting, etc.
jocejoce5,7251515 gold badges4747 silver badges6666 bronze badges
If you are familiar with gcc, as you indicated in the question, you can install MinGW, which will set a linux-like compile environment in Win7. Otherwise, Visual Studio 2010 Express is the best choice.
demoslamdemoslam
Get gcc for Windows . However, you will have to install MinGW as well.
You can use Visual Studio 2010 express edition as well. Link here
AamirAamir11k44 gold badges3737 silver badges6363 bronze badges
You can get MinGW (as others have suggested) but I would recommend getting a simple IDE (not VS Express). You can try Dev C++ http://www.bloodshed.net/devcpp.html Its a simple IDE for C/C++ and uses MinGW internally. In this you can write and compile single C files without creating a full-blown 'project'.
BiGYaNBiGYaN5,28933 gold badges2121 silver badges3939 bronze badges
Compiling Programs on Windows 7:
You have to download configured Borland Compiler from http://www.4shared.com/get/Gs41_5yA/borland_for_graphics.html or http://dwij.co.in/graphics-c-programming-for-windows-7-borland-compiler/.
Put your Borland’s ‘bin’ folder into Environmental Variables.
Now go inside folder ‘bin’ & edit file bcc32.cfg as per your folder structure. This file contains settings of headers & libraries.
Now go inside folder ‘bin’ & edit file bcc32.cfg as per your folder structure. This file contains settings of headers & libraries.
Now create any C/C++ Program say myprogram.cpp
Use following command to compile this bunch of code:
Radim KöhlerUse following command to compile this bunch of code:
109k3232 gold badges212212 silver badges288288 bronze badges
Web Developer in PuneWeb Developer in Pune