我刚刚使用 mac os x 10.12 (Sierra) 和 qt 5.8 for ARM (rasprerry pi) 管理交叉编译。但是,如果我没有遇到任何问题,那就太容易了。我创建了一个非常简单的应用程序,配置环境以从 qt 创建者远程执行它,但是一旦我尝试执行,我仍然遇到错误:
Cannot load library /usr/local/qt5pi/plugins/platforms/libqeglfs.so: (This platform does not support dynamic libraries.)
QLibraryPrivate::loadPlugin failed on "/usr/local/qt5pi/plugins/platforms/libqeglfs.so" : "Cannot load library /usr/local/qt5pi/plugins/platforms/libqeglfs.so: (This platform does not support dynamic libraries.)"
This application failed to start because it could not find or load the Qt platform plugin "eglfs"
in "".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
Reinstalling the application may fix this problem.
Aborted
看起来插件已正确加载:
QT_DEBUG_PLUGINS=1 ./testrpi
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqeglfs.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"eglfs"
]
},
"className": "QEglFSIntegrationPlugin",
"debug": false,
"version": 329728
}
但我认为这条线解释了一切:
QLibraryPrivate::loadPlugin failed on "/usr/local/qt5pi/plugins/platforms/libqeglfs.so" : "Cannot load library /usr/local/qt5pi/plugins/platforms/libqeglfs.so: (This platform does not support dynamic libraries.)"
现在我的问题是 - “这个平台不支持动态库”是什么意思。我怎样才能让我的应用程序工作?
ldd 显示所有库都存在,strace 永远不会显示以负结果打开。我卡住了,所以任何帮助表示赞赏!