Welcome to Esato.com




Free C compiler?


Click to view updated thread with images




Posted by masseur
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!


Posted by Jim
Might be interesting

Posted by masseur
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


Posted by DJcreamz
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.

Posted by Jim
Masseur was it a copy and paste cause you have printf and afaik it's print, might be that the error.

Posted by Rieley
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

Posted by mwarner
@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 ]

Posted by masseur
@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 ]

Posted by k4m!k4ze
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

Posted by Jim
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 .

Posted by mwarner
Oops! I didn't even check my own post for the #include

Posted by Cycovision
@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

Posted by vee
@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

Posted by GOwin
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.

Posted by amd1129
Bloodshed dev-cpp compiler is cool :-D


Click to view updated thread with images


© Esato.com - From the Esato mobile phone discussion forum