解决编译 libfcitxplatforminputcontextplugin.so插件时,产生的Parse error at "IID"错误

为解决Qt等常用软件中不能输入中文字符,下载的库文件也无法正常工作,所以自行编译libfcitxplatforminputcontextplugin.so.

 过程中,遇到不少问题.首先是依赖库的问题.相关解决方案引用如下:

CMake Error at CMakeLists.txt:8 (find_package):

  Could not find a package configuration file provided by "ECM" (requested

  version 1.4.0) with any of the following names:

    ECMConfig.cmake

    ecm-config.cmake

  Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"

  to a directory containing one of the above files.  If "ECM" provides a

  separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

遇到上述错误处里方法:

这个页面 https://launchpad.net/ubuntu/+source/extra-cmake-modules/1.4.0-0ubuntu1 下载 extra-cmake-modules_1.4.0.orig.tar.xz

 https://launchpad.net/ubuntu/+source/extra-cmake-modules/5.18.0-0ubuntu1  extra-cmake-modules_5.18.0.orig.tar.xz

解压后:

cd extra-cmake-modules-1.4.0
cmake .
make
sudo make install

CMake Error at /home/lieefu/Qt5.5.0/5.5/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):

  Failed to find "GL/gl.h" in "/usr/include/libdrm".

处里方法:

sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 

-- Could NOT find XKBCommon_XKBCommon (missing:  XKBCommon_XKBCommon_LIBRARY XKBCommon_XKBCommon_INCLUDE_DIR) 

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):

  Could NOT find XKBCommon (missing: XKBCommon_LIBRARIES XKBCommon) (Required

  is at least version "0.5.0")

处里方法:

Ubuntu 16.04中可以执行 sudo apt install libxkbcommon-dev 安装

wget http://xkbcommon.org/download/libxkbcommon-0.5.0.tar.xz
tar xf libxkbcommon-0.5.0.tar.xz
./configure —prefix=/usr —libdir=/usr/lib/x86_64-linux-gnu —disable-x11
make
sudo make install

编译libxkbcommon用到yacc,如果没有这个命令,会遇到下面的错误,yacc在 bison软件包中

 YACC     src/xkbcomp/parser.c

./build-aux/ylwrap: line 176: yacc: command not found

make: *** [src/xkbcomp/parser.c] Error 127

解决方式如下:

 sudo apt-get install bison

 在所有依赖库文件都找齐的情况下,进行编译,产生如下错误:

解决编译 libfcitxplatforminputcontextplugin.so插件时,产生的Parse error at

及 Parse error at "IID" 错误.

通过不断的查找资料,找原因,最终发现在main.h文件中,缺少 QFcitxPlatformInputContextPlugin类的构造函数.

解决方式,在main.h文件中,添加上标黄部分内容.

解决编译 libfcitxplatforminputcontextplugin.so插件时,产生的Parse error at

 再次编译,编译成功.

解决编译 libfcitxplatforminputcontextplugin.so插件时,产生的Parse error at

你可能感兴趣的:(Parse,error,at)