QT时钟程序报不能加载.so库
-
这是t113 linux下的错误提示:
# ./analogclock ./analogclock: error while loading shared libraries: libQt5Gui.so.5: cannot open shared object file: No such file or directory
此文件是存在的
# cd /usr/local/Qt_5.12.5/lib/ # find ./ -name libQt5Gui.so.5 ./libQt5Gui.so.5 #
在PC端查看的analogclock的文件属性:
$ file analogclock analogclock: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=619b54200f46c1ace574d1d6bd79ada7441318e4, with debug_info, not stripped $ readelf -d analogclock File: analogclock Dynamic section at offset 0x31ac contains 31 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libQt5Gui.so.5] 0x00000001 (NEEDED) Shared library: [libQt5Core.so.5] 0x00000001 (NEEDED) Shared library: [libpthread.so.0] 0x00000001 (NEEDED) Shared library: [libstdc++.so.6] 0x00000001 (NEEDED) Shared library: [libm.so.6] 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000f (RPATH) Library rpath: [/usr/local/Qt-5.12.5/lib] 0x0000000c (INIT) 0x11ea4 0x0000000d (FINI) 0x12cac 0x00000019 (INIT_ARRAY) 0x23000 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x23004 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x00000004 (HASH) 0x1018c 0x00000005 (STRTAB) 0x10d78 0x00000006 (SYMTAB) 0x10698 0x0000000a (STRSZ) 3253 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x232cc 0x00000002 (PLTRELSZ) 712 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x11bdc 0x00000011 (REL) 0x11bbc 0x00000012 (RELSZ) 32 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x11b0c 0x6fffffff (VERNEEDNUM) 5 0x6ffffff0 (VERSYM) 0x11a2e 0x00000000 (NULL) 0x0
-
@huanian 两个的libc不同,可以尝试使用相同的编译器,libc库重新编译qt
-
@yuzukitsuru 感谢回复,我自己摸索解决了。
我用LonganSDK,参照/etc/init.d/rcS里的开机启动脚本,用下面这个指令可以正常启动QT的app# /etc/qtenv.sh & ./analogclock
[1] 16558 /etc/qtenv.sh: line 17: [: too many arguments add /dev/input/event5 to Qt Application. find qt5 installed done xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb Failed to create xkb context
这个xkbcommon: ERROR 报错不影响使用,就没管他
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号