Esato

Forum > General discussions > Non mobile discussion > Free C compiler?

Author Free C compiler?
masseur
P910
Joined: Jan 03, 2003
Posts: > 500
From: Sydney, London
PM
Posted: 2005-05-27 22:00
Reply with quoteEdit/Delete This PostPrint this post
I'm looking for a free C compiler that I can run on my Windows XP pc.

It can be full windows or windows command line based and I'm not interested in a C++ compiler

I was sure there would be a GNU one but so far have not been able to locate it or any other so any ideas or links (legal ones please) would be appreciated

ta!
Jim
T39 black
Joined: Jan 20, 2002
Posts: > 500
From: Belgium
PM
Posted: 2005-05-27 22:30
Reply with quoteEdit/Delete This PostPrint this post
Might be interesting
masseur
P910
Joined: Jan 03, 2003
Posts: > 500
From: Sydney, London
PM
Posted: 2005-05-27 22:59
Reply with quoteEdit/Delete This PostPrint this post
thanks Jim, however that one doesn't seem to be able to cope with this simple program

#include
void main()
{
printf("Hello World\n");
}

it gives an error "illegal return type: found 'int' expected 'void'"

although it was able to run some more complex code
DJcreamz
W850 black
Joined: Jul 09, 2004
Posts: 463
From: Luton / UK
PM, WWW
Posted: 2005-05-27 23:50
Reply with quoteEdit/Delete This PostPrint this post
Are you learning this Mas or are you already well educated in this ?

I only ask cause i got a few books on it and finding it hard to get a grasp of it

sorrry to take it a little of subject.
Jim
T39 black
Joined: Jan 20, 2002
Posts: > 500
From: Belgium
PM
Posted: 2005-05-28 00:26
Reply with quoteEdit/Delete This PostPrint this post
Masseur was it a copy and paste cause you have printf and afaik it's print, might be that the error.
Rieley
K800 Black
Joined: May 27, 2005
Posts: 27
PM
Posted: 2005-05-28 00:29
Reply with quoteEdit/Delete This PostPrint this post
Quote:

On 2005-05-27 22:59:58, masseur wrote:
thanks Jim, however that one doesn't seem to be able to cope with this simple program

#include
void main()
{
printf("Hello Worldn");
}

it gives an error "illegal return type: found 'int' expected 'void'"

although it was able to run some more complex code





well what files are you trying to include? unless you have removed this for the sake of your post
mwarner
K800 Black
Joined: Dec 23, 2003
Posts: > 500
From: Warwickshire, England
PM, WWW
Posted: 2005-05-28 00:47
Reply with quoteEdit/Delete This PostPrint this post
@masseur
If you want a decent IDE then you might want to check out Microsoft's Visual C++ 2005 Express Edition.

Additionally, if you want your code to compile you will need to include the Standard I/O library (printf requires this).

#include <stdio.h>

For documentation, use the MSDN Library.


[ This Message was edited by: mwarner on 2005-06-02 09:19 ]
masseur
P910
Joined: Jan 03, 2003
Posts: > 500
From: Sydney, London
PM
Posted: 2005-05-28 07:07
Reply with quoteEdit/Delete This PostPrint this post
@DJcreamz, I've been doing IT for 25 years, 20 of these as a contractor (freelance) and work with C frequently but want to have a compiler on my pc for the occassions when I want to play and try a few things

there is a pretty good beginners tutorial here and a pretty good pointers, arrays and strings tutorial here

@mwarner, @Jim, @Rieley: that was a cut and paste error, the #include was supposed to say (of course)

#include <stdio.h>

(after making this post the header file name didn't appear again I realised why it wasn't visible first time I posted. The left angle bracket makes it look like the start of a html tag but since it isn't a valid tag it is simply not displayed. I have now edited this post and ticked the box saying "disable HTML on this post" and now you can see it )

but its definitly printf (thats a formatted print) that I am using

I always try a basic program when playing with a new compiler and then try a few more code samples gradually getting more complicated until I am satisfied with it. I used to have a compiler on my old PC but didn't save the install when I got my new VAIO and cannot find that one any more.

I'll check out that Microsoft offering. I'm not really a GUI developer but C++ supports all C syntax so that might well be the way to go though I'd prefer a good, simple and quick compiler

thanks!

_________________
Unless I'm very much mistaken...
my reviews: V800 K700i

[ This Message was edited by: masseur on 2005-05-28 06:40 ]
k4m!k4ze
W710 Violet
Joined: Oct 02, 2004
Posts: > 500
From: CBE
PM
Posted: 2005-05-28 09:01
Reply with quoteEdit/Delete This PostPrint this post
well i have a Turbo C++ version 3.0 compiler from Borland International. I use it all the time for C programming. It can also compile C++ (duh ! ). It does have a UI although it's an old DOS type one. If you want it, let me know
If at first you don't succeed, destroy all evidence of your attempt !!
Jim
T39 black
Joined: Jan 20, 2002
Posts: > 500
From: Belgium
PM
Posted: 2005-05-28 10:28
Reply with quoteEdit/Delete This PostPrint this post
Quote:

but its definitly printf (thats a formatted print) that I am using



Oh ok I'm not really used to C, more on PHP which comes from C so I thought that it was the error .
mwarner
K800 Black
Joined: Dec 23, 2003
Posts: > 500
From: Warwickshire, England
PM, WWW
Posted: 2005-05-28 13:31
Reply with quoteEdit/Delete This PostPrint this post
Oops! I didn't even check my own post for the #include
Cycovision
P990
Joined: Nov 30, 2003
Posts: > 500
From: England
PM, WWW
Posted: 2005-05-28 14:50
Reply with quoteEdit/Delete This PostPrint this post
@masseur

You might want to try dev c++ (freeware)

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

I've been using it for a couple of years, it compiles C and C++ and comes with all of the standard includes. It also comes with standard templates for console apps, windows apps, dlls etc.

I've never had any major problems or complaints with it so far
vee
K750
Joined: Jun 22, 2004
Posts: 435
From: Zagreb, HR
PM
Posted: 2005-05-30 09:35
Reply with quoteEdit/Delete This PostPrint this post
@masseur
"Microsoft Visual C++ 2005 Express Beta is currently available for download free of charge from Microsoft's site. It allows you to create programs for the .NET framework, and possibly also native Win32 programs (with the help of the separately downloaded Microsoft Windows Platform SDK ( http://www.microsoft.com/down[....]f3-7ab010b398a3&DisplayLang=en ) )."


not sure that is what you were looking for, I'd go with Borland or Bloodshed
http://www.borland.com/products/downloads/download_cbuilder.html
http://www.bloodshed.net/devcpp.html

BR,
vee
GOwin
T39 black
Joined: Jan 17, 2002
Posts: > 500
From: .u&#653;op &#477;p&#305;sdn s&
PM, WWW
Posted: 2005-05-31 03:36
Reply with quoteEdit/Delete This PostPrint this post
Have you found it?

Try this list or GNU Compiler Collection.

Also try MinGW - Minimalist GNU for Windows and C++ Conformance Roundup if you're interested in reading C++ compilers conformance to Standards.
amd1129
T68 gold
Joined: Feb 09, 2005
Posts: > 500
PM
Posted: 2005-07-29 18:03
Reply with quoteEdit/Delete This PostPrint this post
Bloodshed dev-cpp compiler is cool :-D

This message was posted from a T68i

Access the forum with a mobile phone via esato.mobi