Best free C compiler for Windows, please

F

Frank

I am relearning C in my effort to clean up the nasty tone of this ng.
What is the best C compiler for Windows that is free? Is it Navia's? I
used his last year and it seemed fine. No C99 nonsense please.

gcc is the best compiler for windows. cheers
 
P

Paul Richards

spinoza1111 said:
Hey, cowboy, I started out in 1401 machine language and worked ten
years in Cobol because I like programming even in crappy languages,
and I'm a professional. The goal is to take down Heathfield, to invade
his turf, burn his huts, and carry off his women. If I have to compile
C I shall.

By "no C99 nonsense" I didn't mean a compiler with C99 features. I
shall use Navia.

As far as I'm aware Pelles C has close conformance to C99, and is also
free.
 
S

spinoza1111

I thought the goal was to "clean up the nasty tone of this ng"
I actually tried to give this thread a chance.

Self-defense isn't part of the problem. I am talking about the quiet
and apparently civil attack on credibility that has no place in a
paraprofession which never has established a consensus on good
practise, and where good practise is for that reason, in the eye of
the beholder, and in the collective eye of small groups.

Humorous hyperbole as above actually improves the tone. The problem is
the constant, whining, clerkish, lower middle class and grim struggle
to be right at all costs.

This struggle winds up constituting the "real world", a second nature
of office politics in which we "have to" do ridiculous things such as
use C because the top man doesn't know a more modern language.

Working together harmoniously is indeed job one, but this real
solution is also a real problem, since most of us were evolved to work
best with members of our gene pool, not strangers. We're thrown into
situations where we have to do stupid things in an intelligent way,
such as master an infantile disorder of a language where that mastery
rewires our brains permanently to be somewhat more stupid than we
were.

For example, I fear this happened to Brian Kernighan. The Kernighan I
met in 1987 and who wrote The Elements of Programming Style is a
better person than the man who praises Ritchie for writing code in an
hour and condemns object orientation for being microslow in Beautiful
Code. I was praised for writing code in an hour in 1972 but I wanted
enough time to write a compiler so that I would not have to use
assembler, and as I show in my book, the very idea that a programming
approach is "slow" or "fast" cannot be even grammatically expressed in
proper English.

Mass media was famously characterised by Adorno and Horkheimer as
psychoanalysis but in reverse, maing us more fearful and less
compassionate. Programming may be this on steroids or a better
metaphor might be that it's neurosurgery in reverse.

For example, we now know that software is best defined in terms of
objects in graphs, lattices and trees with names, not von Neumann's
row of boxes with addresses. But this is almost impossible for the
rewired C programmer to grasp.
 
N

Nobody


Free (gratis, libre), actively maintained, mostly conformant with K&R, C89
and C99, supports various extensions required to do real work (e.g. the
nameless unions used in Microsoft's headers), reasonable optimisation, few
bugs.
 
R

Richard Bos

Tom St Denis said:
Is unsupported, so a bad idea.

That depends entirely on what you want it for. For learning C, it will
probably serve perfectly well.
If you're deadset on developing in Windows get a copy of Cygwin and
learn to use the bash shell [and userland tools] it comes with. At
least then you'll be immersed in a real development environment as
opposed to the highly shiny pointy-clickly nonsense that has become
the norm in most Windows environments...

Oh, lovely. And if you want to develop _for_ Windows? Windows programs
that do not rely on you user installing all the devtools only so he can
run "make install"?

Richard
 
N

Nick Keighley

Is unsupported, so a bad idea.

That depends entirely on what you want it for. For learning C, it will
probably serve perfectly well.
If you're deadset on developing in Windows get a copy of Cygwin and
learn to use the bash shell [and userland tools] it comes with.  At
least then you'll be immersed in a real development environment as
opposed to the highly shiny pointy-clickly nonsense that has become
the norm in most Windows environments...

Oh, lovely. And if you want to develop _for_ Windows? Windows programs
that do not rely on you user installing all the devtools only so he can
run "make install"?

I never understood why typeing "make" is inherently superior
to clicking "Build fred.exe". Hell, I bet there's a shortcut <pause>
yep press F7. I regularly use both sets of tools and I don't get
this Unix snobbery. I admit Windows sadly lacks a decent shell
(as opposed to Unix's 15 incompatible not-quite-completly-broken
shells). Come back Dec Command language all is forgiven!

But then Windows isn't a "real" development environment.
Good grief.
 
N

Nick Keighley

I will add Bloodshed's Dev-C to this list. Its has a nice IDE, colors
etc. Its actually gcc based. Best part, its all free :)

maybe you missed this. *All* the compilers listed above are also free.
And the Microsoft one also has an IDE. For some bizzare reason known
only
unto the marketing division of Microsoft Corporation it's called
"Visual C++ 2008 Express Edition". But it can compile C89 code.
 
T

Tom St Denis

That depends entirely on what you want it for. For learning C, it will
probably serve perfectly well.
If you're deadset on developing in Windows get a copy of Cygwin and
learn to use the bash shell [and userland tools] it comes with.  At
least then you'll be immersed in a real development environment as
opposed to the highly shiny pointy-clickly nonsense that has become
the norm in most Windows environments...
Oh, lovely. And if you want to develop _for_ Windows? Windows programs
that do not rely on you user installing all the devtools only so he can
run "make install"?

I never understood why typeing "make" is inherently superior
to clicking "Build fred.exe". Hell, I bet there's a shortcut <pause>
yep press F7.  I regularly use both sets of tools and I don't get
this Unix snobbery. I admit Windows sadly lacks a decent shell
(as opposed to Unix's 15 incompatible not-quite-completly-broken
shells). Come back Dec Command language all is forgiven!

Um most Linux distros come with bash, and even then csh/tcsh/bash are
not radically different in that they're impossible to sort out. But
the standard for a while has been bash.

But why is "make" [or makefiles] better than "build fred.exe" ... get
back to me when you need a highly scripted build, or multiple
configuration builds.

Like I can do

SMALLCODE=1 make

and it will build a version for small code

or

DEBUG=1 make

for debug stuff.

Sure you can have different project configurations in MSVC but it's so
much easier to script something explicitly instead of menu hunting and
then confirming that it invokes cl.exe with the right parameters. And
god forbid you need to generate data [and/or code] during the build
process [hint: think of flex/yacc as a good example] then you're
really lost.

If msvc were actually gmake compatible then I'd be able to write one
makefile that would build my C projects with both GCC on Linux and cl
in Windows... but I guess compatibility was never really the point.
But then Windows isn't a "real" development environment.
Good grief.

It really isn't. Everything about the inability to script properly in
MSVC drives me up a wall. I work in a Linux environment at work and
do some MSVC side projects with friends in my own spare time. And
aside from wanting to help out friends I can't stand or see myself
otherwise ever using the MSVC tools.

The problem with Microsoft is the same problem I have with the Wii.
Every problem looks like a nail to them. Development tools *should*
support scripting not just shiny point and click, and they should
strive for compliance with the other big players. Why MSVC 2008
doesn't have a "build makefile from project" command in the IDE I have
no idea [and if it does I have yet to find it]. They should support
more than just cl.exe as their compiler, etc. Similarly for the
Nintendo Wii, not all games call for moving a remote through three-
space. Use the other damn controllers for a change.

Point is the "complexity" so often feared by Linux/Unix haters is what
actually gives it any value. The ability to script my builds in 9
different directions makes my code more flexible and easier to manage
in the long run. Learning how to use more than just a hammer makes
you a more productive contractor [so to speak].

Tom
 
N

Nobody

I never understood why typeing "make" is inherently superior
to clicking "Build fred.exe". Hell, I bet there's a shortcut <pause>
yep press F7.

It isn't about how you run make (e.g. if you use XEmacs, F9 runs
"compile", which defaults to "make -k"). The point is that Makefiles are
orders of magnitude more flexible than anything a GUI can provide.
Also, reading a Makefile is easier than hunting through a dozen nested
dialogs trying to figure out why a particular option is being used.
 
P

Phil Carmody

Nick Keighley said:
Tom St Denis said:
The following implementations are free, and conform to C90, modulo
bugs:
Borland C++ 5.5 (despite the name, it does C just fine)
Is unsupported, so a bad idea.

That depends entirely on what you want it for. For learning C, it will
probably serve perfectly well.
If you're deadset on developing in Windows get a copy of Cygwin and
learn to use the bash shell [and userland tools] it comes with.  At
least then you'll be immersed in a real development environment as
opposed to the highly shiny pointy-clickly nonsense that has become
the norm in most Windows environments...

Oh, lovely. And if you want to develop _for_ Windows? Windows programs
that do not rely on you user installing all the devtools only so he can
run "make install"?

I never understood why typeing "make" is inherently superior
to clicking "Build fred.exe".

One can only be performed by a clearly-sighted human being at
a graphical workstation. The other can be done by scripts, humans,
other programs with nothing more complicated than a simple remote
connection which only even needs unidirectional communication.
Hell, I bet there's a shortcut <pause>
yep press F7.

So, how did you automate that 'press' in your script?

Phil
 
P

Phil Carmody

Tom St Denis said:
more than just cl.exe as their compiler, etc. Similarly for the
Nintendo Wii, not all games call for moving a remote through three-
space. Use the other damn controllers for a change.

Well, there's that carrot-juice squirting game where you fend
off the Rabbids in a unidirectional masturbatory frenzy with
the 'chuck.

Phil
 
R

Rafael Anschau

I never understood why typeing "make" is inherently superior
to clicking "Build fred.exe". Hell, I bet there's a shortcut <pause>
yep press F7.  I regularly use both sets of tools and I don't get
this Unix snobbery. I admit Windows sadly lacks a decent shell
(as opposed to Unix's 15 incompatible not-quite-completly-broken
shells). Come back Dec Command language all is forgiven!

1-*Nixes make you feel using a computer. Windows makes you feel using
a video game.

2-Having to use a mouse slows you down, compared to cntl+shift, cntrl
+... You have access keys in windows, but windows is made so that the
mouse is its primary io device.

3-If I want to all of sudden forget about windows
and start building "triangles"(lol), or any other way of interface
with a human being
I can think of, getting apart with the windows paradigm, then I can do
that in nixes. Windows just imposes too many rules on the programmer
specially on user interfaces, while nixes limits are closer to the
limits of the machine.

I don´t see reasons to get snob, but in my view, Unix supports the
idea that a computer
is a tool for the developer(probably because when it was made, that
was so), while Windows supports the idea that it is a tool for regular
users check their e-mail and use word, and only eventually develop.

Rafael
 
R

Richard Bos

Nobody said:
It isn't about how you run make (e.g. if you use XEmacs, F9 runs
"compile", which defaults to "make -k"). The point is that Makefiles are
orders of magnitude more flexible than anything a GUI can provide.

That's fine when _you're_ using them, but not when you inflict them on
your customers. I have nothing against people who use makefiles for
their own delectation - in some cases, I do so myself - but the end
result must be runnable on the target system without requiring a random
and unannounced subset of some other system's devtools, or you're doing
your customers a disservice.

Remember: _you're_ the expert. _They're_ not.

Richard
 
N

Nobody

That's fine when _you're_ using them, but not when you inflict them on
your customers. I have nothing against people who use makefiles for
their own delectation - in some cases, I do so myself - but the end
result must be runnable on the target system without requiring a random
and unannounced subset of some other system's devtools, or you're doing
your customers a disservice.

What would you propose instead? It's not as if there's a /de jure/
standard in this area.

If you want a /de facto/ standard, the leading contender would have to be
GNU make, which is at least available on just about every platform capable
of hosting a compiler. Specific platforms may have their own /de facto/
standards, but all of them are decidedly non-standard (and often entirely
unavailable) on most other platforms, which rules them out for a
multi-platform codebase.
 
N

Nick Keighley

It isn't about how you run make (e.g. if you use XEmacs, F9 runs
"compile", which defaults to "make -k"). The point is that Makefiles are
orders of magnitude more flexible than anything a GUI can provide.

a project I worked on recently had several thousand files. It compiled
under Visual Studio. I don't see how a make file would have made much
difference.
Also, reading a Makefile is easier than hunting through a dozen nested
dialogs trying to figure out why a particular option is being used.

giggle. You haven't seen the makfiles I've seen.
Perhaps that's the dark side of "orders of magnitude more flexible"
You also find makefiles aren't *that* portable.
 
R

Rui Maciel

arnuld said:
I will add Bloodshed's Dev-C to this list. Its has a nice IDE, colors
etc. Its actually gcc based. Best part, its all free :)

Bloodshed's Dev-C is an IDE, not a compiler. It may be shipped with a compiler (Mingw) but it doesn't mean it
is one. It even states that in the project's page [1].


Rui Maciel


[1] http://www.bloodshed.net/devcpp.html
 
R

Richard Bos

Nobody said:
What would you propose instead? It's not as if there's a /de jure/
standard in this area.

I would suggest giving every different kind of customer what _they_
need, not what you want.
If you want a /de facto/ standard, the leading contender would have to be
GNU make, which is at least available on just about every platform capable
of hosting a compiler.

That's not the point. The point is that _distributing_ that makefile to
your customers requires them to have that same compiler, as well. This
is even worse for Ganoo makefiles, which tend to rely on Ganoo devtools
as well, instead of just the POSIX ones.
Specific platforms may have their own /de facto/
standards, but all of them are decidedly non-standard (and often entirely
unavailable) on most other platforms, which rules them out for a
multi-platform codebase.

I would not suggest using _one_ distribution tool for a multi-platform
program in the first place. Using whatever (g)make you want internally
is just fine, but you shouldn't let the system-dependencies leak out to
customers who depend on a different kind of system. Give a Windows
customer an executable installer, and a Solaris customer a (non-Ganoo)
makefile which doesn't demand that a compiler is installed.
Always remember that _we_ are the specialists, and can be expected to
install a new development tool if we need them, and _they_ are mere
users, who should not need to clutter their systems with tools they will
never need again.

Richard
 

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

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top