1

Using Yocto i am able to generate my Linux image and its root file system having libraries for both qt and opencv.

In order to compile QT program there is an SDK poky-eglibc-i686-meta-toolchain-qt5-cortexa15hf-vfp-neon-toolchain-1.6.1.sh .

For compiling Opencv i have another SDK: poky-eglibc-i686-core-image-weston-cortexa15hf-vfp-neon-toolchain-1.6.1.sh.

QT SDK doesnot have any libraries and header files for opencv which is making difficult to compile a program both with Opencv and QT.

I am successfully able to compile Qt programs and opencv programs using separate SDK.

Is there any SDK which can compile a program with both QT and Opencv? Or how should i generate one?

1 Answer 1

3

My preference is to create an image based SDK, ie an SDK that will match your image. This is done by running:

bitbake <your-image> -c populate_sdk

If your image includes a Qt5 application and OpenCV, both of those will automatically be installed into your new SDK. You should have the following line in your image recipe:

inherit populate_sdk_qt5

An alternative is to create your own SDK-recipe, by eg copying meta-toolchain-qt5 to your own layer and renaming it. Then add:

 TOOLCHAIN_TARGET_TASK_append = " opencv"

That should add opencv to your generic Qt5 SDK.

Again, my recommendation is to use the image based approach.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm also using image based approach. My image also contains inherit populate_sdk_qt5. This will pull some nativesdk qt tools and it will create qt.conf sdk file. I'm not sure if these things are somehow pulled in because of dependencies.
@TomasNovotny Thank you for your reply. i did the same thing inherit populate_sdk_qt5 and after that bitbake <your-image> -c populate_sdk. It worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.