1. fatal error: X11/Xlib.h: No such file or directory
x11没有安装完整,于是先输入:sudo apt-cache search x11-dev
libx11-dev - X11 client-side library (development headers)
libxkbcommon-x11-dev - library to create keymaps with the XKB X11 protocol - development files
libghc-x11-dev - Haskell X11 binding for GHC
输入:sudo apt-get install libghc-x11-dev即可
2. 如果编译bochs的过程中出现下面的错误
/usr/bin/ld: gui/libgui.a(x.o): undefined reference to symbol 'XSetForeground'
/usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
此时可以考虑在执行configure时添加参数LIBS='-lX11'
,也就是说可以是这样的:
./configure --enable-debugger --enable-disasm --enable-readline LIBS='-lX11'
3. gtk_enh_dbg_osdep.cc:20:21: 致命错误: gtk/gtk.h:没有那个文件或目录
sudo apt-get install libgtk2.0-dev
sudo make dist-clean 一定要清除干净
sudo ./configure .....
4. ERROR:/usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
没有找到多线程库,在configure时加上LDFLAGS='-pthread'即可
(完)