tags:

views:

217

answers:

6

Where can I get BASIC and C/C++ Compilers for MS-DOS?

+7  A: 

There's DJGPP for C/C++.

http://www.delorie.com/djgpp/

arcanex
This is the definite answer. I spent many happy years using DJGPP back in the day.
FlySwat
This is the answer, I can tell you from hard experience. That is, if you really do mean MS-DOS.
Breton
+1  A: 

If you're on Windows 95 or later you can use the Cygwin version of gcc. It won't give you a basic compiler though.

David Harris
+2  A: 

Turbo C can compile c/c++

mindhacks
This can work, but Turbo C is not open source, sadly. Though you can download it for free, the licensing arrangement of programs compiled using this free version is somewhat unclear to me.
Breton
+2  A: 

http://www.digitalmars.com/ is what was once Zortech, the original 32bit flat memory model DOS compiler.

You can also use GCC either under cygwin or mingw.
The last MSVC to build DOS executables was IIRC 1.52 it's a free download if you have MSDN.

Martin Beckett
+5  A: 

Free (though not necessarily open source) Compilers that target MS-DOS (generally 32-bit but some may also still target 16-bit):

If C alone (without C++ support) is interesting to you, there's also these (I honestly have no idea how well these things might work on modern systems compiling modern source code - actually it's been so long since I've done anything in or for DOS that I don't know how well the 3 compilers above work for MS-DOS either)

Michael Burr
A: 

You can't go wrong with DJGPP (best C++ support, LFNs) or OpenWatcom (multi-platform, also supports 16-bit). For BASIC, try FreeBASIC (which uses DJGPP's libc, assembler, linker but has its own compiler frontend). http://www.freebasic.net

Rugxulo