Qt5.5.1 QtCreator无法输入fcitx问题【例如:搜狗输入法】

这个问题相信困扰很多linux开发的客户,我也折腾了一个晚上终于有了点眉目。

参考了网上很多大咖的方法,其中 http://blog.csdn.net/flfihpv259/article/details/51556464 写的较为详细

可以参考他的教程,我来说说我遇到的问题,其他各种插件准备都是OK的

配置好QT5 环境

开始进入fcitx目录开始cmake

forlinx@ubuntu:~/work$ cd fcitx-qt5
forlinx@ubuntu:~/work/fcitx-qt5$ cmake .

……

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/forlinx/work/fcitx-qt5
forlinx@ubuntu:~/work/fcitx-qt5$

一切正常  然后make

forlinx@ubuntu:~/work/fcitx-qt5$ make

……

编译到60%出现错误

[ 60%] Building CXX object quickphrase-editor/CMakeFiles/fcitx-quickphrase-editor5.dir/filelistmodel.cpp.o
In file included from /usr/include/fcitx-utils/utils.h:67:0,
                 from /usr/include/fcitx-config/xdg.h:37,
                 from /home/forlinx/work/fcitx-qt5/quickphrase-editor/filelistmodel.cpp:22:
/home/forlinx/work/fcitx-qt5/quickphrase-editor/filelistmodel.cpp: In member function ‘void fcitx::FileListModel::loadFileList()’:
/home/forlinx/work/fcitx-qt5/quickphrase-editor/filelistmodel.cpp:65:5: error: ‘typeof’ was not declared in this scope
     HASH_SORT(files, fcitx_utils_string_hash_set_compare);
     ^
/home/forlinx/work/fcitx-qt5/quickphrase-editor/filelistmodel.cpp:65:5: error: ‘typeof’ was not declared in this scope
     HASH_SORT(files, fcitx_utils_string_hash_set_compare);
     ^
make[2]: *** [quickphrase-editor/CMakeFiles/fcitx-quickphrase-editor5.dir/filelistmodel.cpp.o] 错误 1
make[1]: *** [quickphrase-editor/CMakeFiles/fcitx-quickphrase-editor5.dir/all] 错误 2
make: *** [all] 错误 2
forlinx@ubuntu:~/work/fcitx-qt5$

我对应的去找这几个文件好像也都找到了,也都存在就是编译不过去,心塞啊~~~

弄了好久,后来去了fcitx官网看看源码会不会有什么不同发现,突然想到可能是版本的问题

我的操作环境是Ubuntu12.04 + Qt5.5.1属于比较老的版本 GCC都是4.6.1自己升级的4.8.1,有可能是新的fictx-qt5的版本太新了,抱着试试看的心理,去下载了老一点的版本 https://download.fcitx-im.org/fcitx-qt5/fcitx-qt5-1.1.1.tar.xz【56KB】和之前通过教程Git下来的版本fcitx-qt5-1.2.2.tar.xz 【132KB】差了有一倍多源码量。

下载https://download.fcitx-im.org/fcitx-qt5/fcitx-qt5-1.1.1.tar.xz 解压 进入目录

重新cmake .

make

这下通过了编译成功

sudo make install 成功

终于Qt Creator可以输入中文了

另外我会存一个新的分享到网盘,方便使用,会在后面添加更新

-----------------------------------------------------------------------------

2018.01.26




  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值