我如何写一个c ++控制台exe我可以运行msdos? [英] How do I write a c++ console exe which I can run on msdos?

查看:174
本文介绍了我如何写一个c ++控制台exe我可以运行msdos?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找谷歌这一切,但从来没有得到一个明确的答案。
我想写一个简单的hello世界的应用程序,并使其运行在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).

但是首先,我一直在尝试编译一个普通的控制台应用程序,并把它放在dosbox中来测试它, t工作,只是说它无效。所以我假设我需要别的东西来编译它。这是否意味着我有义务在msdos环境中构建我的代码?即使是这种情况,我也不知道如何做到这一点,有点msdos假人..

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!

PS:我运行的是64位系统

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

推荐答案

您可以使用免费的 DJGPP 编译器进行DOS。
这里是使用DJGPP的文档

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

这篇关于我如何写一个c ++控制台exe我可以运行msdos?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆