How can i cross-compile opencv and qt code using same compiler generated by yocto?
-
In order to cross-compile QT code for my target i had a SDK generated by Yocto using
bitbake meta-toolchain-qt5
For opencv i had separate sdk.What i observed is QT SDK doesnot have Opencv files as it should not be because it is for cross-compiling QT application. But opencv SDK has QT libraries but no qmake.
What i did i used sysroot path of Opencv SDK which has libraries for both opencv and QT and compiler and qmake path from QT SDK.
The error i get is:
libpthread and libpthread_nonshared not found.
Qt creator always searches the libs in /usr/lib instead of /opt/poky/1.6.1/.....
Is that the right way to compile an application both with QT and opencv for Yocto linux image? -
Hi,
What do you mean by "You have a separate SDK" ?
-
I had a separate SDK for Opencv which doesnot have qmake to compile Qt applications. But i had found a way to have a single SDK which compiles both opencv and qt applications.
Solution i:
Add to the image recipe against which you want to build the SDK:
inherit populate_sdk_qt5.
Now the do_populate_sdk task knows the target and will install the needed headers and libs on the respective sysroot.Thanks