gpt4 book ai didi

c - 我可以使用哪种现代 C 编译器来构建这个 1992 MS-DOS 程序?

转载 作者:太空狗 更新时间:2023-10-29 15:10:34 26 4
gpt4 key购买 nike

我获得了修改 1992 年构建的 MS-DOS 程序的源代码。我有 EXE 文件并且运行良好,但我需要修改源代码。源代码需要以下 header 才能编译。

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <dos.h>
#include <dir.h>
#include <alloc.h>
#include <ctype.h>
#include <string.h>
#include <mem.h>
#include <values.h>

有谁知道使用了什么,有没有现代编译器可以处理这个问题?我尝试使用“开箱即用”的 Visual Studio 2010 和 GCC,但它失败了,因为缺少某些 header (dir.h、alloc.h、mem.h、values.h)

最佳答案

问它需要什么函数声明、类型声明、全局变量声明和宏可能会更有趣。只要它们都在那里,这些东西在标题中的特定排列就不是很有趣。

所以注释掉有问题的 #includes 并让编译器提示它缺少的位。 然后您知道自己在寻找什么。

关于c - 我可以使用哪种现代 C 编译器来构建这个 1992 MS-DOS 程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7748930/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com