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

J

John Smith

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
 
K

Kenny McCormack

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.
 
W

Walter Roberson

John Smith said:
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.
 
J

jacob navia

John said:
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

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
 
K

Keith Thompson

jacob navia said:
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>
 
R

Richard Heathfield

Walter Roberson said:
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>
 
S

Skarmander

Walter said:
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.
 
S

Spiros Bousbouras

But you still get a linker right ?
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.
 
R

Rod Pemberton

John Smith said:
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/~lcc-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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top