环境
操作系统:Centos7.6
步骤
#下载源码
wget https://ayera.dl.sourceforge.net/project/bochs/bochs/2.3.5/bochs-2.3.5.tar.gz
#解压
tar -xzvf bochs-2.3.5.tar.gz
cd bochs-2.3.5
#安装基本库(解决下面的问题1)
yum install glibc-headers
yum install gcc-c++
#安装X11(解决下面的问题2)
yum -y install ghc-X11
yum -y install ghc-X11-devel
#configure
./configure --enable-debugger --enable-disasm --x-lib=/usr/lib64/X11 --x-include=/usr/include/X11
#编译
make
#安装
make install可能遇到的问题
问题1:configure: error: C++ preprocessor "/lib/cpp" fails sanity check
问题2:ERROR: X windows gui was selected, but X windows libraries were not found.
解决:见以上安装步骤
问题3:编译错误,hash_map问题
解决:修改如下代码中黑体部分
#if BX_HAVE_HASH_MAP
#include <ext/hash_map>
#elif BX_HAVE_HASH_MAP_H
#include <hash_map.h>
#endif
#if BX_HAVE_SET
#include <set>
#elif BX_HAVE_SET_H
#include <set.h>
#endif
using namespace std;
using namespace __gnu_cxx;
问题4:[XGUI ] bochs: cannot connect to X server
问题5: Warning: Missing charsets in String to FontSet conversion
解决: export LANG=C ;
版权声明:本文为u010322362原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。