阅读:13354回复:29

QT5支持插件是否可以单独编译?

楼主#
更多 发布于:2017-05-01 19:54
现在的yong在输入法功能上一切都堪称完美,但是QT5插件好麻烦。
也没找到为yong编译QT5插件的资料,希望周大抽空写个教程(要是能录屏就更好了)。
必须连同整个输入法一块编译吗?还是可以在装好输入法后单独编译?
沙发#
发布于:2017-05-01 20:49
板凳#
发布于:2017-05-01 22:33
dgod:http://yong.dgod.net/read.php?tid=2247&fid=5回到原帖
编译提示错误:


gcc -m32 -fpic -Wall -pipe -g -O2 -c larray.c -o l32/larray.o
Assembler messages:
致命错误: can't create l32/larray.o: 没有那个文件或目录
In file included from /usr/include/stdint.h:25:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:9,
                 from ltypes.h:5,
                 from larray.c:1:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: 没有那个文件或目录
compilation terminated.
地板#
发布于:2017-05-01 22:40
cqoips:编译提示错误:


gcc -m32 -fpic -Wall -pipe -g -O2 -c larray.c -o l32/larray.o
Assembler messages:
致命错误: can't create l32/...
回到原帖
电脑上没有安装32位c编译环境。
你要编译qt插件的话,只编译qt插件即可
4楼#
发布于:2017-05-02 01:22
dgod:电脑上没有安装32位c编译环境。
你要编译qt插件的话,只编译qt插件即可
回到原帖
ubuntu默认已经装了gcc的64位版本,查了一下编译32位程序,需要安装兼容库,但是除了libc6-dev-i386之外,其余不是有冲突装不上,就是官方源里没有……
所以,64位系统应该怎样安装这个编译库呢?64位系统编译yong一定要装32位的库吗?


zhu@ubuntu:~/下载/yong-master$ node build.js l32 l64
gcc -m32 -fpic -Wall -pipe -g -O2 -c larray.c -o l32/larray.o
Assembler messages:
致命错误: can't create l32/larray.o: 没有那个文件或目录
larray.c:120:1: fatal error: error writing to -: 断开的管道
}
^
compilation terminated.


qt5已经装上了,但是也是无法编译


zhu@ubuntu:~/下载/yong-master$ node build.js -C im/qt5-im
Package Qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5' found
child_process.js:507
   throw err;
   ^


Error: Command failed: pkg-config --variable=moc Qt5
Package Qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5' found


   at checkExecSyncError (child_process.js:464:13)
   at Object.execSync (child_process.js:504:13)
   at shell (/home/zhu/下载/yong-master/build.js:580:23)
   at eval (eval at _build_step (/home/zhu/下载/yong-master/build.js:528:7), <anonymous>:23:9)
   at _build_step (/home/zhu/下载/yong-master/build.js:528:2)
   at _run (/home/zhu/下载/yong-master/build.js:806:2)
   at Object.<anonymous> (/home/zhu/下载/yong-master/build.js:809:1)
   at Module._compile (module.js:410:26)
   at Object.Module._extensions..js (module.js:417:10)
   at Module.load (module.js:344:32)
5楼#
发布于:2017-05-02 01:41
看到


yong-master/im/qt5-im/build.txt

下,有这个路径:


/usr/include/qt5


var MOC=shell("pkg-config --variable=moc Qt5");
env("MOCFLAGS=-DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/include/qt5/QtGui/$(QT_VER) -I/usr/include/qt5/QtGui/$(QT_VER)/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore");
env("LDFLAGS+=-Wl,--no-undefined -Wl,-O1 -Wl,-z,relro");


不过,QT官网的run文件安装,是装在了


/opt


目录下面。

图片:选区_005.png







默认并不存在/usr/include/qt5usr/include/qt5/QtGui这两个路径。

这可如何是好?
6楼#
发布于:2017-05-02 08:59
cqoips:看到


yong-master/im/qt5-im/build.txt

下,有这个路径:


/usr/include/qt5


var MOC=shell("pkg-config --variable=moc ...
回到原帖
不要装官网的包,很容易破坏系统的。
sudo apt install qtbase5-dev libxkbcommon-dev libglib2.0-dev
7楼#
发布于:2017-05-02 13:50
dgod:不要装官网的包,很容易破坏系统的。
sudo apt install qtbase5-dev libxkbcommon-dev libglib2.0-dev
回到原帖
周大抽空做个编译纪录吧,总是各种报错,也没个参详。开发环境和依赖总是配不好,Error得快怀疑人生了。
8楼#
发布于:2017-05-02 14:11
cqoips:周大抽空做个编译纪录吧,总是各种报错,也没个参详。开发环境和依赖总是配不好,Error得快怀疑人生了。回到原帖
我对debian系列不熟。qt5插件的编译现在还无法在debian下通过,环境和fedora下不一样。
9楼#
发布于:2017-05-02 21:55
更新一下代码吧,现在可以在deepin下编译了
上一页
游客

返回顶部