Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write a c++ console exe which I can run on msdos?

I've been looking all over google for this but never got a clear answer.. I'm trying to write a simple hello world application and make it run under msdos (which I will be installing on a old rig lying around here).

But first things first, I've been trying to compile a normal console application and drop it in dosbox to test it out which doesn't work, just says it's invalid. So I assume I need something else to compile it with. Does this mean I'm obligated to build my code in a msdos environment? Even if this is the case, I have no clue at all how to do this, kinda a msdos dummy..

If anyone can shed some light on my case I would be very grateful!

P.S: I'm running a 64bit system

like image 460
Jens Ackou Avatar asked Dec 27 '22 16:12

Jens Ackou


1 Answers

You can use the free DJGPP compiler for DOS.
And here is the documentation for using DJGPP.

like image 156
Chimera Avatar answered Jan 07 '23 10:01

Chimera