Table of Contents
1 在ubuntu 10.04上面编译bochs 2.2.6遇到了一些编译问题
symbols.cc: At global scope: symbols.cc:137: error: ISO C++ forbids declaration of ‘hash_map’ with no type symbols.cc:137: error: expected ‘;’ before ‘<’ token symbols.cc:145: error: expected constructor, destructor, or type conversion before ‘<’ token symbols.cc: In constructor ‘context_t::context_t(Bit32u)’: symbols.cc:152: error: ‘map’ was not declared in this scope symbols.cc: In static member function ‘static context_t* context_t::get_context(Bit32u)’: symbols.cc:173: error: ‘map’ was not declared in this scope make[1]: *** [symbols.o] Error 1 make: *** [bx_debug/libdebug.a] Error 2
1.1 修改源文件 symbols.cc
using namespace std; #ifdef __GNUC__ using namespace __gnu_cxx; #endif (新加的)
1.2 安装如下package:
sudo apt-get install build-essential sudo apt-get install xorg-dev sudo apt-get install bison
1.3 config
- 如果需要使用gdb:
./configure --enable-gdb-stub --enable-new-pit --enable-all-optimizations --enable-4meg-pages --enable-global-pages --enable-pae --enable-sep --enable-cpu-level=6 --enable-sse=2 --disable-reset-on-triple-fault --with-all-libs
- 如果使用bochs自带的debug工具
./configure --enable-disasm --enable-debugger --enable-new-pit --enable-all-optimizations --enable-4meg-pages --enable-global-pages --enable-pae --enable-sep --enable-cpu-level=6 --enable-sse=2 --disable-reset-on-triple-fault --with-all-libs
1.4 make
$make $sudo make install