CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Centos 7 成功安装 dosbox 解决 "error: expected primary-expression before ‘,’ token" 错误大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

dosbox-0.74 bug 修复版下载: http://download.csdn.net/detail/yangbodong22011/9663271 注意:这篇博客解决了下面这个问题,如果你也恰巧遇到了这个问题,请继续往下读,完整的安装过程后面也有。 make 操作错误信息如下: In file included from ../../include/programs.h:28:0,

dosBox-0.74 bug 修复版下载: http://download.csdn.net/detail/yangbodong22011/9663271

注意:这篇博客解决了下面这个问题,如果你也恰巧遇到了这个问题,请继续往下读,完整的安装过程后面也有。

@H_359_19@make 操作错误信息如下: In file included from ../../include/programs.h:28:0,from cpu.cpp:29: ../../include/dos_inc.h: In member function ‘void DOS_MCB::SetFilename(const char*)’: ../../include/dos_inc.h:543:78: error: expected priMary-expression before ‘,’ token void SetFilename(char const * const _Name) { MEM_BlockWrite(pt+offsetof(sMCB,fileName),_name,8); } ......(省略) cpu.cpp: In member function ‘void TaskStateSegment::Get_SSx_ESPx(Bitu,Bitu&,Bitu&)’: cpu.cpp:294:37: error: expected priMary-expression before ‘,’ token PhysPt where=base+offsetof(TSS_32,esp0)+level*8; ^ cpu.cpp:294:38: error: ‘esp0’ was not declared in this scope PhysPt where=base+offsetof(TSS_32,esp0)+level*8; ^ cpu.cpp:294:42: error: ‘offsetof’ was not declared in this scope PhysPt where=base+offsetof(TSS_32,esp0)+level*8; ^ ......(省略)

安装过程如下:

一:下载dosBox

下载地址: https://sourceforge.net/projects/dosbox/

二:解压,进入目录

$ tar xvf dosBox-0.74.tar.gz
$ cd dosBox-0.74/

三:环境依赖检测

$ ./configure

发现错误如下所示:

提醒没有SDL,yum 直接安装就好

$ yum install SDL
$ yum install SDL-devel

安装好之后./configure@H_403_193@就可以成功了

四:编译 (makE)

$ @H_744_21@make

报错如下:

这也是最难解决的地方,好多人安装至此就放弃了,源码的符号错误谁能接受!瞬间对dosBox作者水平产生怀疑。但是呢,人非圣贤,孰能无过。找啊找,竟然真的找到了dosBox作者对这个问题的回答。

https://www.vogons.org/viewtopic.php?f=31&t=45585

好了,之后我找到了解决方法,不卖关子了,用下面链接中的dos_inc.h@H_403_193@替换原目录中include/dos_inc.h@H_403_193@就好了,链接在此:

http://sources.debian.net/src/dosbox/0.74-4.2/include/dos_inc.h/

替换之后,make成功。

五:make install

$ @H_744_21@make install

六:启动

$ dosBox

之后的使用操作我就不赘述了,遇到问题解决问题总是让人开心的,如果也解决你的问题,请点个赞吧!

大佬总结

以上是大佬教程为你收集整理的Centos 7 成功安装 dosbox 解决 "error: expected primary-expression before ‘,’ token" 错误全部内容,希望文章能够帮你解决Centos 7 成功安装 dosbox 解决 "error: expected primary-expression before ‘,’ token" 错误所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。