【发布时间】:2021-09-10 08:40:51
【问题描述】:
我正在将一个 Windows 项目从 VC6 迁移到 VS2019,但出现错误:
E0020 标识符“_segment”未定义
我试图找到 _segment 定义但没有运气。所以,我想知道 _segment 是否可能是 VC6 中的关键字。但是,我仍然在 Google 中一无所获。
知道如何修复错误吗?谢谢。
代码是:
#ifndef _MSC_Ver
#define _MSC_Ver
#endif
/* MS-C ?? */
#ifdef _MSC_VER
_segment SegDefine,SegType,SegSym,SegCode;
#endif
#define ALLOC_C
#include "common.h"
#include <malloc.h>
#include "extern.h"
#ifdef MSDOS
#include <dos.h>
#ifndef __WATCOMC__
#include <memory.h>
#endif
#endif
/* MM(????)? */
#define MaxClass 8
#ifdef _MSC_VER /* MS-C ?? */
/* FARBased ? */
static USHORT mmFarSeg[MaxClass]; /* ?? */
static USHORT mmFarBase[MaxClass]; /* */
static USHORT mmFarOrg[MaxClass]; /* ?? */
static USHORT mmFarSize[MaxClass]; /* */
【问题讨论】:
标签: visual-studio visual-c++ compiler-errors