[oe] building and running a qt5 application

Trevor Woerner trevor.woerner at linaro.org
Sat Aug 24 01:29:09 UTC 2013


After finding the answers to these questions I'll update this email in
case others come asking the same questions.

On 16 August 2013 00:13, Trevor Woerner <trevor.woerner at linaro.org> wrote:
> If the build system knows it's going to be putting the qt5 header
> files in $sysroot/usr/include/qt5/etc, why not simply use that instead
> of requiring the users to update the include paths themselves in all
> their recipes?

This is so that qt4 and qt5 applications can co-exist in the same
image. My assumption had been that if you were using qt4 then
everything would need to be qt4 and if you were using qt5 everything
would need to be qt5. Apparently this is not so. Apparently qt4 and
qt5 applications can mingle. To support this mingling the qt5 headers
are placed in their own qt5 subdirectory.

If, as occurred in my case, you're only using qt5 then you can use the
line I provided above in your recipe to make the qt5 includes the
default:

    OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"

> Secondly, I added both "qtbase" and my package to IMAGE_INSTALL, added
> the "meta-qt5" layer to "bblayers.conf", specified "QT5_VERSION" as
> "5.0.2", and then built. When I tried to run my application I received:
>
>     Failed to load platform plugin "xcb". Available platforms are:
>
>     Aborted

To fix this I needed to add "qtbase-plugins" to my image in addition
to what I had done above.



More information about the Openembedded-devel mailing list