原创内容,转载请注明出处: https://www.myzhenai.com.cn/post/1925.html
kchmviewer依赖QT,所以在安装之前您必须先要安装QT,请参考官方安装包里的README文档.
3. INSTALLATION
  Usually kchmviewer is distributed in source code archive, so you need to compile it first. It requires Qt version
  4.4 or higher. Note that you need to install qt4-devel and qt4-tools packages (the last one might be included in
  qt4-devel in your distribution), not just qt package.
  Also make sure you have chmlib-devel (some distros have it as libchm-devel) package installed. KDE build will check
  for its presence, but qmake does not have necessary functionality to do so. If you are getting errors regarding missing
  chm_lib.h file this means chmlib-devel is not installed.
3.1. Qt-only version
  To compile Qt-only version of kchmviewer, follow the procedure:
  > tar zxf kchmviewer-
  > cd kchmviewer-
  > qmake
  > make
    The compiled binary is in bin/kchmviewer. You could copy it somewhere, or use it as-is. It does not require installation.
  If QtWebKit module is not found, you will get the following error:
  > kchmviewwindow_qtwebkit.h:25:21: error: QWebView: No such file or directory
  Either install QtWebKit module, or remove “webkit” from QT+= line in src/src.pro
3.2 KDE4 version
  To compile the version of kchmviewer with KDE4 support, follow the procedure:
  > tar zxf kchmviewer-
  > mkdir build
  > cd build
  > cmake ..
  > make
  > sudo make install
  For KDE version the installation is required, since the KHTML KIO slave cannot be used in place.