title: Issues with Qt trying to make Darknet with OpenCV support
body: <p>I am working on Ubuntu 16.04. I am trying to <code>make</code> <a href="https://github.com/pjreddie/darknet" rel="nofollow noreferrer">darknet</a> after having successfully installed OpenCV. I have already successfully installed darknet with CUDA support, but I am now trying to empower it with OpenCV, setting <code>OPENCV=1</code> in its makefile as indicated in <a href="https://pjreddie.com/darknet/install/" rel="nofollow noreferrer">the official page</a> ().</p>
  
  <p>This is (an extract) of the output I get from <code>make</code>:</p>
  
  <pre><code>[...]
  /usr/local/lib/libopencv_highgui.so: undefined reference to `QWidget::isFullScreen() const@Qt_5'
  /usr/local/lib/libopencv_highgui.so: undefined reference to `QWidget::hasHeightForWidth() const@Qt_5'
  /usr/local/lib/libopencv_highgui.so: undefined reference to `QPen::QPen(QBrush const&amp;, double, Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)@Qt_5'
  /usr/local/lib/libopencv_highgui.so: undefined reference to `QStatusBar::showMessage(QString const&amp;, int)@Qt_5'
  [...]
  </code></pre>
  
  <p>I get a similar outcome if I try to build some test projects to verify the correct functioning of OpenCV. So I believe the problem lies in some linkage around OpenCV.</p>
  
  <p>It seems <code>make</code> does not see Qt libraries in its path. I tried to fix this problem by adding the library folder of Qt5 to both PATH and LD_LIBRARY_PATH, as suggested by <a href="https://stackoverflow.com/a/40327731/1844776">this</a> answer, adding the following lines to my <code>.profile</code> file:</p>
  
  <pre><code>export  LD_LIBRARY_PATH=/usr/include/x86_64-linux-gnu/qt5:$LD_LIBRARY_PATH
  export  PATH=/usr/include/x86_64-linux-gnu/qt5:$PATH
  </code></pre>
  
  <p>then running <code>source .profile</code> and making sure the content was successfully updated with <code>echo PATH</code> and <code>echo LD_LIBRARY_PATH</code>. The outcome was the same.</p>
  
  <p>Is it possible that the folder I added to the path was incorrect? What else could be the cause of this problem?</p>