Page 1 of 1
DJGPP
Posted: Wed Jan 03, 2007 9:29 am
by Touch
What is DJGPP? I have downloaded it with C++ support. But, I have no idea what it does.
Posted: Wed Jan 03, 2007 9:34 am
by AJ
DJGPP is a Windows port of the GNU C/C++ compiler.
Normally, when you download it there are instructions how to set it up - which involves manually setting the PATH and DJGPP environment variables. It is the compiler I use for OS dev and so far, no problems...
HTH
Adam
Posted: Wed Jan 03, 2007 9:54 am
by Touch
Thanks. I have done some PATH changes but blindly, as I couldn't find any instructions.
Posted: Wed Jan 03, 2007 10:00 am
by Ready4Dis
Yeah, it is a compiler for use under windows or Dos, as stated, you must set your path and DJGPP environment values in accordance with the readme.1st file supplied. It is what I use for my OS development, and it works well. Also, you should download rhide, it's an ide (text based, similar to borlands turbo c ide in dos), and will get you on your way to writing some simple apps. You'll have to do a lot of learning to use it for OS dev, because none of those dos things are available for you (unless your os is 16-bit provides dpmi services for a lot of stuff). Anyways, read the readme.1st file, and make a simple program and see if you can get a hello world app working, after that it's just getting familiar with the compiler and tools.
Posted: Wed Jan 03, 2007 10:04 am
by AJ
OK - IIRC you need the following to get DJGPP working:
PATH=%PATH%;[path of djgpp]\bin
DJGPP=[path of djgpp]\djgpp.env
Other than that, unzip all of the files you have downloaded in to a single directory (obviously preserving the file paths). I have done this in to c:\djgpp\, so have the environment variables:
PATH=%PATH%;c:\djgpp\bin
DJGPP=c:\djgpp\djgpp.env
You seem to know how to do this, but for anyone who doesn't know, you can either set the variables via control panel->system->advanced, or set them at the command prompt (or in a batch file) with SET PATH=... and SET DJGPP=...
Cheers,
Adam
Posted: Sun Jan 07, 2007 1:04 am
by carbonBased
AJ wrote:
DJGPP is a Windows port of the GNU C/C++ compiler.
It's actually a DOS port, isn't it? If I recall, DJGPP is a DOS app, which is relevant (below).
AJ wrote:
It is the compiler I use for OS dev and so far, no problems...
As have others, indeed. I have heard some stories of difficulty, however. DOS apps under windows (can) have inherent problems. Because of this, I'd like to suggest an alternative -- cygwin.
Nothing against DJGPP. I used it a lot in the past, myself. However, having used cygwin on my windows computers, I'm pretty impressed with it. It gives the developer a good approximation of a unix environment, but is entirely windows based.
--Jeff
Posted: Sun Jan 07, 2007 3:27 pm
by smbogan
The only problems I have experienced with DJGPP is the limitation on command line length. Which is easy to get around with a program called execlong, or using the @filename.txt where filename.txt contains command line parameters. (Yes, before brynet says something, it is a limitation of DOS/Windows, not DJGPP)
Posted: Sun Jan 07, 2007 3:49 pm
by Alboin
carbonBased wrote:
Nothing against DJGPP. I used it a lot in the past, myself. However, having used cygwin on my windows computers, I'm pretty impressed with it. It gives the developer a good approximation of a unix environment, but is entirely windows based.
--Jeff
For general programming (Not Osdev.) I'm quite partial to mingw, as it doesn't try to fix windows by adding a unix layer, but just lets you program things that run nativley on Windows. Moreover, you aren't encumbered by any 3rd party dll. (I try to use as few external libraries as possible.)
That's all really.....Not much else to say....