Physics Forums

Physics Forums (http://www.physicsforums.com/index.php)
-   Programming & Computer Science (http://www.physicsforums.com/forumdisplay.php?f=165)
-   -   Good windows compiler for C (http://www.physicsforums.com/showthread.php?t=580791)

thedude36 Feb23-12 09:24 PM

Good windows compiler for C
 
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.

jhae2.718 Feb23-12 09:37 PM

Re: Good windows compiler for C
 
Try MinGW. It's a port of GCC for Windows. (I develop almost exclusively on Linux, so I haven't used it.)

chiro Feb23-12 09:39 PM

Re: Good windows compiler for C
 
Quote:

Quote by thedude36 (Post 3781129)
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.

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:

http://www.bloodshed.net/devcpp.html

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.

jhae2.718 Feb23-12 09:41 PM

Re: Good windows compiler for C
 
Rereading the OP, GCC is probably not the way to go for a beginner.

camel-man Feb23-12 11:25 PM

Re: Good windows compiler for C
 
Download Pelles C its an IDE strictly for C in windows. Pelles uses LCC

MisterX Feb23-12 11:25 PM

Re: Good windows compiler for C
 
Quote:

Quote by thedude36 (Post 3781129)
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.

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.

chiro Feb23-12 11:37 PM

Re: Good windows compiler for C
 
Quote:

Quote by camel-man (Post 3781326)
Download Pelles C its an IDE strictly for C in windows. Pelles uses LCC

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.

Chemicist Feb23-12 11:47 PM

Re: Good windows compiler for C
 
Visual Studio is fairly simple to use. However, when I don't use that, I use Pelles or DevC++.

rcgldr Feb24-12 01:51 AM

Re: Good windows compiler for C
 
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.

thedude36 Feb26-12 05:44 PM

Re: Good windows compiler for C
 
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!!!

jhae2.718 Feb26-12 06:39 PM

Re: Good windows compiler for C
 
If you're a student you can generally get the Professional version of Visual Studio for free from Microsoft. https://www.dreamspark.com/

phiby Feb27-12 12:24 AM

Re: Good windows compiler for C
 
Quote:

Quote by jhae2.718 (Post 3785986)
If you're a student you can generally get the Professional version of Visual Studio for free from Microsoft. https://www.dreamspark.com/


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

jhae2.718 Feb27-12 08:57 AM

Re: Good windows compiler for C
 
The image file I have is 2.2 GB for VS2010 Pro through MSDN AA.

Ivan92 Mar11-12 12:48 AM

Re: Good windows compiler for C
 
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.

harborsparrow Mar12-12 05:49 AM

Re: Good windows compiler for C
 
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.


All times are GMT -5. The time now is 03:32 PM.

Powered by vBulletin Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2014 Physics Forums