2016-05-25 45 views
0

我正在使用Yocto在嵌入式主板(i.MX6)上执行Qt和QtWebEngine的第一步。使用提供的示例食谱,如quicknanobrowser,在目标上很好地工作。所以我无法确认this answer哪个声称WebEngine在嵌入式平台上不可用。Yocto SDK,QtWebEngine:QT中的未知模块:webengine

现在我想编写自己的QML应用程序并将其部署到电路板上。配方meta-toolchain-qt5我创建了一个SDK并安装它。在QtCreator我将所有路径的SDK安装,并试图构建它,但得到这个错误:

Project ERROR: Unknown module(s) in QT: webengine 
11:13:13: The process "/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" exited with code 3. 

原来WebEngine不包括在SDK中。由于this answer,我固定的投入由以下我自己packagegroup-qt5-toolchain-target.bbappend文件:

RDEPENDS_${PN} += " \ 
    qtwebengine \ 
    qtwebengine-qmlplugins \ 
    qtquickcontrols-qmlplugins \ 
    qtwebengine-examples \ 
" 

然后重新安装SDK。目前看来,所有WebEngine文件可在SDK安装用(zsh glob模式下面匹配的/opt/poky/1.8/任何子目录中的所有目录,其中包含“webengine”,不区分大小写):

% ls -1 -d (#i)/opt/poky/1.8/**/*webengine*(/) 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/ 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/5.4.3/QtWebEngine/ 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/ 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/5.4.3/QtWebEngineWidgets/ 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/qml/QtWebEngine/ 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webengine/ 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webenginewidgets/ 
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/translations/qtwebengine_locales/ 

不过,我得到相同未知模块错误。这是独立QtCreator的,也可以通过直接调用QMAKE所示:

% source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi 
% /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake /home/me/test/test.pro -r -spec linux-oe-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug 
Project ERROR: Unknown module(s) in QT: webengine 

项目本身应该没有问题,因为它编译并没有在桌面上安装运行流畅。

任何想法? SDK中是否还有一些文件丢失? qmake在哪里搜索模块?我该如何告诉qmake在哪里可以找到WebEngine安装?

回答

0

/opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

添加sh /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/environment-setup.d/qt5.sh

这将设置QT5环境。

+0

感谢您的回答!然而,这个文件已经在'/ opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi'中找到了。因此添加它或者甚至手动采集它并没有帮助。 –

+1

尝试关注此维基设置Qt创建者http://wiki.hioproject.org/index.php?title=HIO_Wiki:Set_Up_Qt_Creator_for_Yocto_Device –