Node: MS-DOS with DJGPP, Next: MS-DOS or OS/2 with EMX, Up: Compilation Notes

#### MS-DOS with DJGPP

The only compiler that is capable of compiling the GNU Compiler Collection (GNU CC or GCC) under MS-DOS is GCC itself. In order to compile GPC or GCC for MS-DOS with DJGPP you will therefore need either a working copy of DJGPP installed, or you will have to cross-build from a non-MS-DOS system.

Building GPC under MS-DOS with DJGPP follows the same scheme as building GPC under a Unix-like system: Place the `p` subdirectory in the `gcc` directory and follow the instructions for compiling GCC. This requires `bash` and many other tools installed, and you must be very careful at many places to circumvent the limitations of the DOS platform.

Our preferred way to build GPC for DJGPP is to cross-build it from a Unix-like platform – which is much easier. For instructions, see Cross-Compilers and Crossbuilding.