crosscompiling opencv for raspberry pi with qt

Sysprogs forums Forums VisualGDB crosscompiling opencv for raspberry pi with qt

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21144
    yoggas
    Participant

    Hi, I’ve created a project using qt.  But I don’t know how to add opencv libraries and includes properly to visualgdb project properties to run my application. I’ve got all errors like undefined reference to ‘cv::namedWindow’, ‘cv::imshow’, ‘cv::fastFree(void*) etc.
    In qmake project settings in ‘Include directories’ field I’ve added \opencv\build\include and in ‘Library directories’ field I’ve added opencv\build\x86\vc14\lib directories.  In ‘Library names’ I add libraries like ‘opencv_core2413’ and  I get ‘toolchain test failed’, “cannot find -lopencv_core2413”.

    • This topic was modified 6 years, 4 months ago by yoggas.
    #21147
    support
    Keymaster

    Hi,

    As OpenCV is natively built with CMake, referencing it from a QMake-based project would involve non-trivial amount of manual settings edits.

    Instead we would advise creating a CMake-based Qt projects (see this tutorial for details) and then referencing OpenCV using the regular find_package logic (see this tutorial).

    If this is not an option, let us know and we can help you understand the logic behind the library paths and names so you could find the correct settings for the QMake project.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.