2

I am trying to use OpenCV with ubuntu-sdk for an app. I am using the qml app with c++ using the cmake template, downloaded the opencv source in the modules folder and added at the backend/CMakeLists.txt:

add_subdirectory(modules/opencv)
include_directories(${OpenCV_INCLUDE_DIR})
link_directories("${CMAKE_CURRENT_BINARY_DIR}/modules/opencv/lib")

It compiles but if i include opencv it throws an error that it cant find the files.

I dont know much for cmake and qt, so any help will be great

2

I quickly found out that it couldnt find some headers because i didnt properly copied them (silly me).

But it didnt solve the linking problem. I managed to solve that with manually compiling opencv for every architecture and inlcuding the library files in the project, following this project as a reference: https://github.com/nikwen/ubuntu-tox-client

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.