| Previous | Next | Up | Top |
Q: Where can I find an example of XXXX / a package doing YYYY ?
A: Salvador Eduardo Tropea (SET) maintains a
DJGPP Web Ring page. DJ Delorie offers another very large collection of
DJGPP-related links.
Here is a list of places you might look into for examples of frequently needed code fragments, or for packages people keep asking about:
- Interrupt-driven support of peripheral devices and hooking hardware interrupts:
- Network support libraries:
- for TCP/IP, check out the WATTCP library, which is available from its home, or
from a Europe mirror, it provides the TCP/IP sockets interface. (I am told that you can safely ignore the warnings you get when compiling
the package.)
- as part of the DOS Lynx port done by DJ Delorie, he ported the WATTCP library as well; that port is available
from DJ's server.
- programs which run on Windows 9X can use the Winsock services built into Windows to establish TCP/IP connections; a C++ interface to Winsock 1 was
written by Dan Hedlund.
- another Winsock library is libsocket, originally developed by Indrek Mandre, currently maintained by
R. Dawe. The latest version (0.7.3, as of this writing) is available from the libsocket home page, and via FTP
from the DJGPP archives. This currently doesn't support the newer Winsock2 VxD which is part of Windows 98.
- yet another version of Winsock interface is available at Brennan Underwood's site.
- if you need to program an IPX interface, you can get started by downloading examples of IPX programming, and also read the
IPX Web page.
- Dynamically loaded code:
- X library:
- Ports of various GNU utilities not included in DJGPP:
- GUI libraries:
- SWORD (the System of Windows for the ORganization of the Desktop) is a Graphic User Interface library made with C++ objects, written and maintained by
Eric Nicolas. The latest version 2.50 is available from the v2tk directory as
sw21_*.zip. SWORD is a powerful system for dedicated programmers, specifically designed to allow a programmer to learn GUI programming. However, I'm told that its documentation
might not be clear enough for beginners.
- JPTUI is an object-oriented textual user interface, written by Jean-Pierre Delprat. It is designed for C++, and supports several languages
besides US English. You can get JPTUI from SimTel.NET or any of its mirrors.
- the BCGUI package, written by Bill Currie; you can get it from Bill upon request.
- If you actually have the original Borland Turbo Vision, then you might want to get patches to compile Turbo Vision under DJGPP. For more info on this port, visit the
TVPlus site.
- Another port of TVision was done by Robert Hoehne. Due to copyright problems, that port cannot be distributed (at Borland's request, Robert has
removed it from his Web page). So you will have to get the Turbo Vision sources from the Borland's site, patch them using patches included in the RHIDE distribution, and rebuild it yourself.
- A Turbo Vision like library for plain C, called C-Desktop, by Brett Porter, is available from DJGPP sites
on SimTel.NET mirrors.
- Another GUI library is XView-PC GUI interface, maintained by Antonio Carlos M. de Queiroz. XView-PC is available
via the Web and also via the FTP transfer.
- Game programming:
- The best library for DOS game programming is the Allegro game programming library, written and maintained by
Shawn Hargreaves; also available from Allegro home page.
Allegro is ported to X. A tutorial for game programming, called Allegro Vivace, was written by
George Foot, and is available from George's home page.
- Also try Jlib written by J P Griffiths. This library is best suited to
multi-platform game programming, since it's portable to Linux, Watcom, and X11. Visit the Jlib Web page, for the latest developments.
- Another popular library for game development is MGL, the MegaGraphics Library by SciTech Software. MGL provides transparent support for DirectX, OpenGL, Mesa, and several other
popular graphics standards (although some of these standards reportedly only work when used with RSXNTDJ). The latest version 4.1 has full DJGPP support. MGL is available
from SciTech's FTP site.
- The Mesa library itself supports DJGPP and is available from the Mesa home page.
- Yet another package that supports DirectX 5 for DJGPP and RSXNTDJ is available via the Web.
- If you need to play audio CDs, try the Brennan Underwood's CD playing library.
- VGA graphics:
- Paul Fenwick wrote an X-Mode package Xlib or
Xlib at Oulu.
- Matthew Bentley has written a C++ VGA graphics library for mode 13h (and is reportedly 4 times faster than Allegro in this mode) called EZVGA.
It is available as ezvga14.zip from the v2tk directory on DJGPP sites.
- Multi-tasking libraries and OS kernels:
- Pthreads, a Posix threads library, is a portable, standard package supported on many platforms.
- The LWP package is a lightweight preemptive multitasking library written by Josh Turpen for DJGPP. It has an extremely simple API and is very fast. You
can get LWP via the Web.
- PDMLWP is a multithreading package for DJGPP. It is available as pdmlwpNN.zip (NN is a version number) from the v2tk directory on the
DJGPP sites.
- Bill Currie has written a COFF boot loader using DJGPP; you can get this
COFF boot loader from Alaric Williams' Web site.
- Palantir is a multitasking kernel for Allegro, written and maintained by Dim Zegebart. Palantir is available
from DJGPP sites.
- Development toolkits and packages:
- MSS is a package for detecting problems with dynamic memory allocation, such as using uninitialized memory, overwriting the limits of allocated blocks, memory leaks, repeated deallocations, etc.
It is available from the DJGPP sites, and supports both C and C++ programs. MSS was written and is maintained by
Peter Palotas.
- Cdecl is a program for translating hairy C and C++ declarations and type casts into human-readable English. A DJGPP port by Nate Eldredge is available
via FTP.
- LCLINT is a Lint clone. Lint is a program which analyses C source files, identifies unsafe or potentially buggy code and prints error/warning messages about each such case.
gcc -Wall can identify many such cases as well, due to the superior diagnostics of GCC, but for those who still want Lint, you can find
LCLint sources on the Web.
- VIM is a programmer's editor, mostly popular in the Unix world. It features syntax highlighting for more than 60 different file formats, context-sensitive help, and a macro
language for writing extensions. The sources are available via ftp, and should compile with DJGPP. Binaries are available for Windows 9X and
NT, as well as for DOS.

You can help support this site by
visiting the advertisers that sponsor it! (only once each, though)