title: Undefined reference to opencv dnn on QtCreator
body: <p><strong>Error</strong></p>
  <p>Unable to link OpenCV DNN module with QtCreator : <em>/home/joseph/Documents/dev/dnn_opencv/utils.cpp:52: error: undefined reference to `cv::dnn::dnn4_v20200609::Net::Net()</em></p>
  <p><strong>Context</strong></p>
  <p>Hi, I am trying to load some models with OpenCV DNN (OpenCV 4.4.0) module in order to do some classification/segmentation as part of a bigger project.
  To do so I am using QtCreator (5.15.0) and gpp (10.1.0). OpenCV was built from source with the OpenCV-contrib.</p>
  <p>My .pro file looks like that :</p>
  <pre><code>TEMPLATE = app
  CONFIG += console c++11
  CONFIG -= app_bundle
  CONFIG -= qt
  
  INCLUDEPATH += &quot;/usr/local/include/opencv4&quot;
  
  LIBS += -L&quot;/usr/local/lib/&quot; \
  -lopencv_highgui \
  -lopencv_imgproc \
  -lopencv_core
  -lopencv_dnn
  
  
  SOURCES += \
      main.cpp \
      utils.cpp
  
  HEADERS += \
    utils.hpp
  </code></pre>
  <p>The project is very simple so far, I am able to prompt images with OpenCV so it seems the usual libraries are being found. However whenever I use something within the DNN module I have this error : <em>/home/joseph/Documents/dev/dnn_opencv/utils.cpp:52: error: undefined reference to `cv::dnn::dnn4_v20200609::Net::Net()</em>
  This is happening calling <code>cv::dnn::Net net;</code> using namespace or not.</p>
  <p>I have noticed that in the file <em>/usr/local/include/opencv4/opencv2/dnn/version.hpp</em> that there is a flag <code>#define OPENCV_DNN_API_VERSION 20200609</code> which corresponds to the dnn version where the Net class is to be found but I don't know where this could lead me.</p>
  <p>I don't have much experience with Qmake and OpenCV so it's probably a simple fix but I'd appreciate some help. Thanks!</p>