views:

440

answers:

3

Hi all!

I'm using Code::Blocks with MinGW to write my C++ applications in Windows XP. Now I want to compile my code to run under an MS DOS environment, so I can put it on my DOS formatted floppy disc. Can anyone help me?

Thanks in advance.

P.S. I don't mean the Command Prompt, but really the good old MS DOS Operating System.

+1  A: 

I haven't developed for MS-DOS for some decades; but I'd start checking the tools used on Free-DOS. Maybe there's already a gcc package for it.

Javier
+4  A: 

It's pretty old, but DJGPP exists precisely for DOS development. I hasn't been updated since 2000, but it works.

It's basically the same as MinGW, but exclusively for DOS.

greyfade
I agree that's the best bet, but I wouldn't put any money on it compiling modern, idiomatic C++ code.
anon
Oh, I can guarantee it won't. It only has GCC 2.96, if memory serves. Unless someone is maintaining the DOS target on the GCC 3.x series, that's about the only choice.
greyfade
Sorry that I marked this as accepted so late. Oh well...
Time Machine
+1  A: 

What year was this written??? (Says four months ago.) Uh, no, DJGPP is still supported, it has G++ 4.4.1 (or unofficial 4.4.2, even)!! The libc itself is still being (very slowly) tweaked, but even 2.03p2 "stable" is from 2002 and 2.04 "beta" from 2003. Where did you get year 2000 and GCC 2.96 (never supported by DJGPP, 2.96 wasn't even an official FSF release, it was a Red Hat fork) from????

Rugxulo