Newbie requires advise... Where can I get a freeware C compiler?

11 views
Skip to first unread message

John Smith

unread,
Sep 17, 2006, 4:11:54 PM9/17/06
to
Hi,

A. I need to learn C and I would like to know where I can get a freeware
compiler.

B. Any good freeware tutorials or sites I should visit to help me speed up
learning?

C. My need to learn C is to have the tools to work at low level for hard
disk work, any pointers from anyone would be most appreciated.

TIA


Kenny McCormack

unread,
Sep 17, 2006, 4:19:11 PM9/17/06
to
In article <eek7h9$u6g$1...@mawar.singnet.com.sg>,

John Smith <Jo...@smith.com> wrote:
>Hi,
>
>A. I need to learn C and I would like to know where I can get a freeware
>compiler.

There are many, but we can't talk about them here.

>B. Any good freeware tutorials or sites I should visit to help me speed up
>learning?

This isn't it.

>C. My need to learn C is to have the tools to work at low level for hard
>disk work, any pointers from anyone would be most appreciated.

I suggest you start doing some easy disk work, then work your way up.

Walter Roberson

unread,
Sep 17, 2006, 4:26:46 PM9/17/06
to
In article <eek7h9$u6g$1...@mawar.singnet.com.sg>,
John Smith <Jo...@smith.com> wrote:

>A. I need to learn C and I would like to know where I can get a freeware
>compiler.

You haven't indicated your platform; you haven't indicated whether you
need for C99 support or whether C89 will do; you have not defined
what you mean by "freeware" in this context.

For a lot of people, gcc is fairly acceptable, but it isn't ported
to everything, does not have -full- C99 support, and is copyrighted
with license terms that need to be thought about carefully.


>C. My need to learn C is to have the tools to work at low level for hard
>disk work, any pointers from anyone would be most appreciated.

You are skipping over a number of important assumptions there. The
operating system will make a -big- difference in how you approach
working with devices. If you are using an "embedded system" then
you probably have direct access to I/O registers that are needed
to control the drives, but unless you are careful your code would
also end up being locked in to that one platform.

If you are using a unix-like system, or are using one of the Windows NT
or later operating systems, then you need to build a device driver
rather than talking to the disk directly. The device drivers of
NT/W2K/XP are *quite* different than those used for Unix like systems;
and even within Unix-like systems, there are major schisms in driver
implementation. In order to write device drivers effectively, you
often have to learn a fair bit about the internals of the operating
system you are using: the steps you have to take are quite different
than just going ahead and accessing the hardware.

Then there's the issue that you haven't defined what -kind- of
drives you want to work with at the low level. SCSI? ATA? IDE?
SATA? Fibre Channel? DASD?

You can often find pre-written drivers for the most popular
operating systems. Those might give you enough access to do
whatever kind of operations you want, and might already be
generalized to handle a large number of different kinds of drives.
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest

jacob navia

unread,
Sep 17, 2006, 4:34:25 PM9/17/06
to

You can get a free C compiler for the windows
OS and the linux OS from
http://www.cs.virginia.edu/~lcc-win32

It comes with a compiler+linker+IDE+debugger in the
windows version. Under linux you get only a
command line compiler, but since linux comes with
many IDEs you can pick up one.

There is a tutorial introducing you to the compiler system
and to the C language at the same URL.

To work at "hard disk work"... I do not know, it is a C compiler
and the assembler interface is quite primitive.

But I would learn C first.

jacob

Keith Thompson

unread,
Sep 17, 2006, 5:12:30 PM9/17/06
to
jacob navia <ja...@jacob.remcomp.fr> writes:
[...]

> You can get a free C compiler for the windows
> OS and the linux OS from
> http://www.cs.virginia.edu/~lcc-win32
>
> It comes with a compiler+linker+IDE+debugger in the
> windows version. Under linux you get only a
> command line compiler, but since linux comes with
> many IDEs you can pick up one.

<OT>
I see no mention of Linux on the web page.
</OT>

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.

Richard Heathfield

unread,
Sep 17, 2006, 5:41:37 PM9/17/06
to
Walter Roberson said:

> In article <eek7h9$u6g$1...@mawar.singnet.com.sg>,
> John Smith <Jo...@smith.com> wrote:
>
>>A. I need to learn C and I would like to know where I can get a freeware
>>compiler.
>
> You haven't indicated your platform;

Doesn't really matter. Either he's on Linux, in which case he's got gcc, or
he's on Windows, in which case there's a whole bunch to choose from (see
http://www.cpax.org.uk/prg/portable/c/resources.php#FreeCompilers for a
list), or he's on a Mac, in which case heaven help him, or he's on big
iron, in which case he's probably got one installed already, or he's on
some little bitty-box, in which case he needs to get a Real Computer (tm).

> you haven't indicated whether you
> need for C99 support or whether C89 will do;

If he really needs C99 support, he need only wait a few decades. :-)

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)

Skarmander

unread,
Sep 17, 2006, 5:46:22 PM9/17/06
to
Walter Roberson wrote:
> In article <eek7h9$u6g$1...@mawar.singnet.com.sg>,
> John Smith <Jo...@smith.com> wrote:
>
>> A. I need to learn C and I would like to know where I can get a freeware
>> compiler.
>
> You haven't indicated your platform; you haven't indicated whether you
> need for C99 support or whether C89 will do; you have not defined
> what you mean by "freeware" in this context.
>
> For a lot of people, gcc is fairly acceptable, but it isn't ported
> to everything, does not have -full- C99 support, and is copyrighted
> with license terms that need to be thought about carefully.
>
If you want to modify the compiler, yes. If you want to use the compiler,
no. For learning C, we can easily exclude the possibility that the OP is
interested in using code from gcc somehow. The license terms for gcc are no
more interesting than those of any other compiler in this regard.

S.

jacob navia

unread,
Sep 18, 2006, 3:38:18 AM9/18/06
to
Keith Thompson wrote:
> jacob navia <ja...@jacob.remcomp.fr> writes:
> [...]
>
>>You can get a free C compiler for the windows
>>OS and the linux OS from
>>http://www.cs.virginia.edu/~lcc-win32
>>
>>It comes with a compiler+linker+IDE+debugger in the
>>windows version. Under linux you get only a
>>command line compiler, but since linux comes with
>>many IDEs you can pick up one.
>
>
> <OT>
> I see no mention of Linux on the web page.
> </OT>
>

Yes, it is fairly new. I just finished the port last week.

Spiros Bousbouras

unread,
Sep 18, 2006, 4:13:52 AM9/18/06
to
jacob navia wrote:

> Keith Thompson wrote:
> > jacob navia <ja...@jacob.remcomp.fr> writes:
> > [...]
> >
> >>You can get a free C compiler for the windows
> >>OS and the linux OS from
> >>http://www.cs.virginia.edu/~lcc-win32
> >>
> >>It comes with a compiler+linker+IDE+debugger in the
> >>windows version. Under linux you get only a

> >>command line compiler... <SNIP>

But you still get a linker right ?

> >
> >
> > <OT>
> > I see no mention of Linux on the web page.
> > </OT>
> >
>
> Yes, it is fairly new. I just finished the port last week.

I take it you still have a lot more testing to do then. If that
goes well I'll check it out at some point. If it compiles Crafty
and makes a faster executable than gcc I will be very
interested.

John Smith

unread,
Sep 18, 2006, 2:52:40 PM9/18/06
to
Thanks everyone


"John Smith" <Jo...@smith.com> wrote in message
news:eek7h9$u6g$1...@mawar.singnet.com.sg...

Rod Pemberton

unread,
Sep 18, 2006, 2:50:21 PM9/18/06
to

"John Smith" <Jo...@smith.com> wrote in message
news:eek7h9$u6g$1...@mawar.singnet.com.sg...
> Hi,
>
> A. I need to learn C and I would like to know where I can get a freeware
> compiler.
>

Which platform? I'll help you out on this question. But, you'll need to be
more specific or Google/Yahoo for the other questions to which I could
easily provide hundreds of links. This is a small selection of the
available free C compilers:

Linux:
----
GCC http://gcc.gnu.org/
TCC http://fabrice.bellard.free.fr/tcc/
OpenWatcom http://www.openwatcom.org/index.php/Main_Page

Unices:
----
GCC http://gcc.gnu.org/
TenDRA http://www.tendra.org/
TenDRA15 http://www.ten15.org/

DOS:
----
DJGPP http://delorie.com
OpenWatcom http://www.openwatcom.org/index.php/Main_Page
CC386 http://www.members.tripod.com/~ladsoft/cc386.htm
DiceRTE http://www.diefer.de/dicerte/

Windows:
----
Microsoft Visual C# or C++ (yes, it's free)
http://msdn.microsoft.com/vstudio/express/default.aspx
Cygwin http://www.cygwin.com/
Mingw http://www.mingw.org/
OpenWatcom http://www.openwatcom.org/index.php/Main_Page
LCC-Win32 http://www.cs.virginia.edu/%7elcc-win32/
Pelles C (LCC based) http://www.smorgasbordet.com/pellesc/index.htm
CC386 http://www.members.tripod.com/~ladsoft/cc386.htm
DiceRTE http://www.diefer.de/dicerte/

Generic:
LCC http://www.cs.princeton.edu/software/lcc/

Rod Pemberton


Default User

unread,
Sep 18, 2006, 4:16:40 PM9/18/06
to
John Smith wrote:

> Thanks everyone

Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html>

Reply all
Reply to author
Forward
0 new messages