tags:

views:

739

answers:

3

I am brand new to C and programming. I would like to use DJGPP as my compiler at this point. How can I install it? From what I understand it is multiple files. I cant seem to find a site that actually has the files that has working links. Thank you!

I am on Windows Vista.

+2  A: 

His official website worked for me when I downloaded it:

http://www.delorie.com/djgpp/zip-picker.html

Choose what you want and follow the instructions.

v3
+3  A: 

I've used DJGPP for some time, and I quickly switched to MinGW. IIRC DJGPP is an old 16-bit compiler and I had problems with accents or whatever. MinGW seems to be the most up to date GCC port for Windows.

Bastien Léonard
DJGPP is a 32-bit system.
Laurynas Biveinis
One thing I have noticed is that compilation time is really long if you have large global variables - they seem to be compiled into the EXE itself. (Is this a limitation of Windows? I don't think this happens in VC++, but it definitely doesn't happen in g++ on linux)
v3
v3: if your variables aren't zero-intialized, their values have to be present in the object file/executable. It's the same on Unix.
Bastien Léonard
@Bastien: But they ARE zeroed - this happens with large global arrays without initializers.
v3
kastauyra: since DJGPP runs on DOS, I expect that it's a 16-bit program that acts as a DOS-extender (makes 32-bit mode available to 16-bit applications).
Bastien Léonard
@Bastien: the tiny stub that loads DJGPP-compiled executables might be 16 bit, but neither DJGPP user nor programmer will see anything else than 32 bit environment (unless one does low-level stuff that requires communication with 16 bit DOS code).
Laurynas Biveinis
+2  A: 

Installing DJGPP on Vista might be a bit challenging for you now. I'd recommend that you go with native Windows C compiler, for example, Cygwin or MinGW.

If you insist on trying DJGPP, then go to the DJGPP zip picker and select options as necessary. Pick Windows 2000 or XP for an OS.

The reason why it's better to go with native Windows compiler than DOS-based one such as DJGPP is that DOS support in 2000/XP/Vista is rather buggy and limited. DJGPP developers have done heroic amount of effort to support these OSes, but some of the limitations are unfortunately unavoidable.

Laurynas Biveinis
Really? Had no problems with DJGPP on XP.
EFraim
It depends on the DJGPP version. The last official release was 2.03 which was released very long time ago and has the most problems on XP. The 2.04 beta is the one which has workarounds for most problems but which is non-trivial to find for beginners. The 2.03 release has been refreshed to fix some but not all things on XP. See http://clio.rice.edu/djgpp/win2k/main.htm
Laurynas Biveinis