How to use OpenVINO library in Qt5.9.1 on Ubuntu

  • Environment:
    *OS: Ubuntu 16.04
    *Qt: 5.9.1
    *OpenVINO: toolkit for linux 2018 R5
    *OpnenCV: 4.0.1

    I want to use Intel OpenVINO library in Qt 5.9.1
    My Qt pro file setting is:
    INCLUDEPATH += /usr/local/include

    LIBS += /usr/local/lib/
    -ldl -lpthread -fopenmp

    And my code is:
    // load network from IR
    CNNNetReader netReader;
    // set maximum batch size to be used
    CNNNetwork network = netReader.getNetwork();
    // instantiate a plugin for a target hardware
    InferencePlugin plugin = PluginDispatcher({""}).getPluginByDevice("CPU");
    // create executable network and infer request
    ExecutableNetwork executable_network = plugin.LoadNetwork(network,{});
    InferRequest infer_request = executable_network.CreateInferRequest();

    But I got the error message :
    undefined reference to 'omp_get_thread_num@VERSION'
    undefined reference to 'omp_get_max_threads@VERSION'
    undefined reference to 'GOMP_parallel@VERSION'
    undefined reference to 'omp_get_num_threads@VERSION'

    Has anyone experienced this?
    Or know how to write Qt pro file can let OpenVINO be worked?


  • Qt Champions 2018

    @Hank_Lee LIBS should actualy be like this:


    LIBS += -L/usr/local/lib -lopencv_ \
      -lopencv_highgui \
      -lopencv_core \
      -lopencv_imgproc \
      -lopencv_imgcodecs \
      -lopencv_video \
      -lopencv_videoio \

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.