Reviving this thread somewhat, I'd just like to ask a few questions
about the available free C compilers for C development under Windows.
Yes, it's a little Windows specific all of a sudden but at least it's
still C programming!
I do like the command line BTW. The last IDE I used was Turbo C 2.01,
but that 10 years of Unix for you. Type "make", go get coffee/sleep.
Computers are too fast now, can't sleep during compiles any more :-(
Ok, there's the free Borland 5.5 compiler, which is a little dated
perhaps, especially in regards to the Windows API. However, nothing
prevents me from writing my own header files, copying from the Win
SDK! It has the distinct advantage of being standalone, with no
install (just a 8MB zip file). Set your PATH and off you go. You do
end up doing a static link against Borland CRT.
Visual C++ 2005/2008 Express is free but you need to download the
Windows SDK to do anything useful like Win32 programming. Ruddy great
big install. Looks like you can dynamically link with a sole
dependency on msvcrt.dll, but you can't. There's MSVCR70.DLL,
MSVCR80.DLL and MSVCR90.DLL and they can sod off if they think I'm
distributing them. So static link again. Sigh.
{
Note Visual C++ 2008 creates an unnecessary dependency by calling
GetSystemWindowsDirectoryW. So compiled executables will not run on
Windows 98SE or ME. Now, I don't worry too much about 98SE given its
age but I'll be damned to hell if I'll let Microsoft dictate to me
what markets I may not access. It's one thing if I'm knowingly using
calls that 98SE didn't have but it's quite another to have MS
arbitrarily remove that market (however big it is). Rant over.
Sorry
}
The earlier free Visual C++ compilers were non-optimising. Which I
thought was rather mean.
Erm. I'm not all that sure about Borland's CRT library and threading.
MS no longer has a single threaded CRT anymore, just libcmt.... I
worry about things like errno biting me in the ass some day. Someone
somewhere mentioned that everything is threaded on WinXP and the CRT
should be written to assume that (or maybe I'm losing it.)
I haven't used Watcom C or MinGW, but maybe those are better. I guess
I have a irrational liking for Borland given my love of Turbo C all
those years ago! I keep feeling it would be nice to dynamic link
against msvcrt.dll, given that it is always there, but perhaps I'm
being irrational and static linking is just fine. If Sysinternals can
produce single 100KB executables that do magic and don't need a
massive redistributable, then so can I. Maybe...
Cheers,
Conor.