我有一个Qt Quick应用程序:
/home/xx/projects/build-{project name}-Desktop_Qt_5_8_0_GCC_64bit
|----app (binary)
|----imports (folder)
| |----org (folder)
| |----my (folder)
| |----qt (folder)
| |----libMyQuick.so
| |----qmldir
我通过QQmlApplicationEngine :: addPluginPath(...)和QQmlApplicationEngine :: addImportPath(...)
在插件路径和导入路径中添加了跟踪路径QCoreApplication::applicationDirPath() + "/imports"
QCoreApplication::applicationDirPath() + "/imports/org/my/qt"
"/home/xx/projects/build-{project name}-Desktop_Qt_5_8_0_GCC_64bit/imports/org/my/qt"
当我运行app时,出现错误:
./ app:加载共享库时出错:libMyQuick.so:无法打开共享对象文件:没有这样的文件或目录
它可以在Qt Creator中运行。
我该如何解决?
项目: https://www.dropbox.com/s/ho22c2pdsi2kaiq/TestQtQuickPlugin.tar.bz2?dl=0