Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Using QMake to compile a Visual Studio project which uses QT5 & OpenCV libraries

    Mobile and Embedded
    qmake-qt5 cmake qt 5.4.2 visual studio
    2
    2
    1902
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MarKS
      MarKS last edited by

      Hello,
      I must admit i am relatively new to QMake and CMake. I have built a OpenCV project in Visual Studio 2015 which uses QT libraries for GUI. The project is running perfectly fine.

      But i want to run this project on a ARM board (ODROID XU3, Ubuntu 14.04). I have compiled OpenCV libraries on the board but no Qt creator because of space limitations. How can i use QMake to build this project on this board without writing a single line of code?

      I did research about writing QMake files but didn't find much about linking OpenCV libraries to it.

      Please help! I need this for my project.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        For qmake you can use something like:

        INCLUDEPATH += /path/to/OpenCV/include/folder
        
        LIBS += -L/path/to/OpenCV/lib/folder \ 
                    -lopencv_coreXXX \
                    -lopencv_imgprocXXX \
                    -lopencv_highguiXXX \
                    # next OpenCV libs you need
        

        Note that you can also setup your project on your Windows machine using either qmake or cmake and once it's building there, bring it over to your Linux target, and add the Linux specific pieces to link to OpenCV

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post