qt 5.8 raspberry pi插件加载错误

qt 5.8 raspberry pi插件加载错误,qt,raspberry-pi,qt5.8,Qt,Raspberry Pi,Qt5.8,我刚刚使用MacOSX10.12Sierra和Qt5.8为ArmRaspreryPI管理交叉编译。不过,如果我没有遇到任何问题,那就太容易了。我创建了一个非常简单的应用程序,将Environment配置为从qt creator远程执行,但在尝试执行时仍然出现错误: Cannot load library /usr/local/qt5pi/plugins/platforms/libqeglfs.so: (This platform does not support dynamic librarie

我刚刚使用MacOSX10.12Sierra和Qt5.8为ArmRaspreryPI管理交叉编译。不过,如果我没有遇到任何问题,那就太容易了。我创建了一个非常简单的应用程序,将Environment配置为从qt creator远程执行,但在尝试执行时仍然出现错误:

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显示所有LIB都存在,strace从不以负结果显示open。我被困住了,所以感谢您的帮助

Ok问题出现在qtcorelib的构建中,在qtbase/src/corelib/plugin/qtlibrary_unix.cpp文件中,其中的标志:

#define QT_NO_DYNAMIC_LIBRARY
定义并导致所有问题。解决方案是在定义和重建qtcore库之后,执行undefqt\u NO\u动态库

问候
你在RPi中有哪些操作系统?raspbian-jessieI也有同样的问题,但你的答案无法解决。据我所知,您编辑的文件名为qlibrary_unix.cpp,没有t。我使用您的解决方案成功编译了qtbase,但问题仍然存在。