捣弄了很久了,如今终于有点上路的感受了。。。嘿嘿
linux
先说下本身的搞的配置:系统是ubuntu14.04LTS64位的,安装的是:bochs-2.4.5,采用的是源码编译的方式来安装的(ps:原本想在命令行中直接sudo apt-get install bochs的,试了几回,好像都不行,就没弄了。据说,命令行下安装的没有调试功能)。ubuntu
很少废话了,开始安装:windows
1.先去http://nchc.dl.sourceforge.net/project/bochs/bochs/2.4.5/bochs-2.4.5.tar.gz 下载bochs-2.4.5.tar.gz测试
2.解压下载的源代码:ui
sudo tar zxvf bochs-2.4.5.tar.gz |
3.进入bochs-2.4.5目录,运行configure脚本,它会测试你的机器,C/C++编译器以及一些库,用来判断何种配置适合于你的机器。运行:this
sudo ./configure --enable-debugger --enable-disasm |
(上面--enable-debugger --enable-disasm 是可选项,这两个是开启调试和反汇编功能)
spa
4.第3步正确运行后,会产生一个Makefile文件,而后:.net
sudo make |
5.安装:命令行
sudo make install |
至此,bochs安装已经结束。下面是编译安装过程当中可能出现的一些问题及解决方法:debug
错误A.configure: error: C++ preprocessor "/lib/cpp" fails sanity check
由于Bochs是用C++写的,因此这里要安装GNU gcc/g++编译器。
解决办法:
sudo apt-get install build-essential |
sudo apt-get install g++ |
错误B.checking for default gui on this platform... x11
ERROR: X windows gui was selected, but X windows libraries were not found.
解决办法:
sudo apt-get install xorg-dev |
错误C.ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package.
解决办法:
sudo apt-get install libgtk2.0-dev |
错误D.
make的时候提示 /usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol pthread_create@@GLIBC_2.1 // lib/i386-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld r
解决方法
在makefile的libs中添加以下内容 :
-lz -lrt -lm -lpthread
很晚了,明天再来写配置方面的东西。。。。