1.apt-get install build-essential
2.apt-get install xorg-dev
3.apt-get install libgtk2.0-dev
4.apt-get install bison
tar vxzf bochs-2.4.5.tar.gz
cd bochs-2.4.5/
./configure --enable-debugger --enable-disasm
sudo make install
关于make报错:
1,没有多线程库
/usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol 'pthread_create@@GLIBC_2.1'
/usr/bin/ld: note: 'pthread_create@@GLIBC_2.1' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [bochs] Error 1
解决方法:
打开Makefile,在92行左右找到 LIBS = 。。。一行,在这一行最后面添加 -lpthread
(注意修改完成之后不能重新configure,不然添加的-lpthread会消失,添加后直接make就可以了)
由于个人系统安装软件的不同,我在安装过程中还遇到下面的问题:
1.没有c++编译器
$ sudo yum install gcc-c++.i686
2.没有找到gtk头文件
$ sudo yum install gtk2-devel.i686