DJGPP

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

DJGPP

Post by Touch »

What is DJGPP? I have downloaded it with C++ support. But, I have no idea what it does.
"We cannot trust the sword in the hands of a n00b!" - Southpark
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

Post by Touch »

Thanks. I have done some PATH changes but blindly, as I couldn't find any instructions.
"We cannot trust the sword in the hands of a n00b!" - Southpark
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Post 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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Post 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
smbogan
Member
Member
Posts: 29
Joined: Tue Nov 21, 2006 3:17 pm

Post 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)
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post 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.... :wink:
C8H10N4O2 | #446691 | Trust the nodes.
Post Reply