是Linux编译的依赖库路径不对,需要将依赖库的路径设置为当前路径,然后重新编译,使用的是QtCreator在麒麟系统下编译;
# ----------------------------------------------------
# This file is generated by the Qt Visual Studio Add-in.
# ------------------------------------------------------
TEMPLATE = app
TARGET = DevicesManager
MOC_DIR=$$PWD/temp/moc
RCC_DIR=$$PWD/temp/rcc
UI_DIR=$$PWD/temp/ui
OBJECTS_DIR=$$PWD/temp/obj
DESTDIR = $$PWD/../bin/linux64/DevicesManager
DEFINES += QT_DEPRECATED_WARNINGS
QT += core sql network opengl widgets gui printsupport positioning webchannel webengine webenginewidgets
QMAKE_CXXFLAGS +=-finput-charset=UTF-8 -fexec-charset=utf-8 -std=c++11 -std=c++14 -std=c++17
CONFIG += DEBUG
INCLUDEPATH += ./GeneratedFiles\
./GeneratedFiles/Release\
$$PWD/AddDevice \
$$PWD/Common \
$$PWD/../include/hpr \
$$PWD/../include/hlog \
$$PWD/../include \
$$PWD/../include/QtXlsx \
$$PWD/../include/HUIControl \
$$PWD/../include/lpc \
$$PWD/../include/HCNetSDK \
$$PWD/../include/Sadp \
$$PWD/../include/DhNetSDK
LIBS += -L$$DESTDIR \
-lOpenGL \
-lhpr \
-lhlog \
-lHUIControl \
-lLPC \
-lhcnetsdk \
-lsadp \
-ldhnetsdk \
-lQt5Xlsx \
-ldhconfigsdk
LIBS += -Wl,-rpath=./
QMAKE_LFLAGS += -Wl,-rpath,"'\$$ORIGIN'" -Wl,-rpath,"./" -Wl,-rpath-link,"$(DESTDIR)" -std=c++11
DEPENDPATH += .
include(DevicesManager.pri)