Good windows compiler for C

  1. I'm wanting to start learning C and I'm trying to find a good compiler. So far i've found alot of C++ compilers and I'm not sure if it would let me write code in just C. I've downladed Visual C++ 2010 express, but the interface is kind of confusing me. I was wondering if anyone knew of a good compiler for a beginning programmer.
  2. jcsd
  3. jhae2.718

    jhae2.718 1,152
    Gold Member

    Try MinGW. It's a port of GCC for Windows. (I develop almost exclusively on Linux, so I haven't used it.)
  4. As far as I am aware any decent standard-compliant C++ compiler should compile valid C code.

    I do recall that there are some 'bastardized' ways of passing information, but if you use 'good' C code then everything should compile well.

    I haven't used C for a while but I do remember that there were some features which I considered 'bad', but I started C with the C++ kind of programming style and not the 'C-Only' style.

    My recommendation is to use a good C++ compiler to compile your C code.

    One free compiler and IDE suite is Dev-CPP:

    You could if you wanted to just do everything by a command-line shell (or prompt for windows) but this is a lot of work to setup initially: I recommend you using something like Dev-CPP or Visual-Studio.

    If you are overwhelmed by the later Visual Studio, see if you can get Visual Studio 6.0 or Visual C++ 6.0: its interface is minimal and still has enough features to get things done quickly.
  5. jhae2.718

    jhae2.718 1,152
    Gold Member

    Rereading the OP, GCC is probably not the way to go for a beginner.
  6. Download Pelles C its an IDE strictly for C in windows. Pelles uses LCC
  7. Visual C++ should be acceptable for a beginner. A Visual C++ project has a collection of files associated with it, which are "source" and "header" files. The program's main function should go in a "source" file.

    A beginner should start with an win32 console application (check "empty project"). You can create it from the wizard. Then you may add source file for your main function right clicking on the "Source Files" folder. Select .c or .cpp file.
  8. I used to know somebody who used this compiler and he remarked that it was pretty good.

    I would only caution the OP to be aware that the extensions like operator overloading are not in the original C standard and if they were going to use these custom extensions that they be aware of this fact.
  9. Visual Studio is fairly simple to use. However, when I don't use that, I use Pelles or DevC++.
  10. rcgldr

    rcgldr 7,695
    Homework Helper

    What part of the visual c++ interface is confusing to you? When I first started using visual c++, the main issue I ran into was creating a new project, and having to select "empty project" on the second menu (after clicking next) to avoid the stuff that visual c++ otherwise generates by default. The other issue I ran into was that unicode was on by default, and I had to right click on the project name, then properties, select "all configurations", and change "unicode" to "not set".

    So starting with a new directory with just source files, create a project using that directory name, chose "empty project" when that option appears, ... then once at the main menu, click on project, then "add existing item" to add the source files.
  11. Thanks for all the responses. Tried out Dev C++ but it said it wasnt able to run on 64 bit versions of windows. but I figured out what i needed to know for visual c++ and am now able to compile and run programs, so im pretty excited. Thanks again for the help!!!
  12. jhae2.718

    jhae2.718 1,152
    Gold Member

    If you're a student you can generally get the Professional version of Visual Studio for free from Microsoft.

  13. Does anyone know the size of the standalone VC++ download? I am currently on a limited plan.
  14. jhae2.718

    jhae2.718 1,152
    Gold Member

    The image file I have is 2.2 GB for VS2010 Pro through MSDN AA.
  15. A nice compiler for Windows would be Code::Blocks. I use it on my PC when I need to run some C++ code. This also works for C as well.
  16. harborsparrow

    harborsparrow 423
    Gold Member

    Visual Studio Express 2010 is free (and is very good); it has a C compiler (technically C++, but as long as you aren't doing graphical user interfaces, you can just compile C with it.
Know someone interested in this topic? Share this thead via email, Google+, Twitter, or Facebook

Have something to add?