title: compile darknet as dll
body: <p>im having some problems with google colab:</p>
  
  <p>when i try to compile darknet with <code>LIBSO=1</code>, and <code>#define TRACK_OPTFLOW</code> i got this error message:</p>
  
  <pre><code>...
  In file included from src/yolo_console_dll.cpp:23:0:
  include/yolo_v2_class.hpp:233:10: fatal error: opencv2/cudaoptflow.hpp: No such file or directory 
  #include &lt;opencv2/cudaoptflow.hpp&gt;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  Makefile:155: recipe for target 'uselib' failed
  make: *** [uselib] Error 1
  </code></pre>
  
  <p>then i added the missing .hpp files to a new opencv2 folder inside colab, but I get this other problem,</p>
  
  <pre><code>/tmp/ccRQih9B.o: In function `Tracker_optflow::tracking_flow(cv::Mat, bool)':
  yolo_console_dll.cpp:(.text._ZN15Tracker_optflow13tracking_flowEN2cv3MatEb[_ZN15Tracker_optflow13tracking_flowEN2cv3MatEb]+0x108): undefined reference to `cv::cuda::cvtColor(cv::_InputArray const&amp;, cv::_OutputArray const&amp;, int, int, cv::cuda::Stream&amp;)'
  /tmp/ccRQih9B.o: In function `Tracker_optflow::update_tracking_flow(cv::Mat, std::vector&lt;bbox_t, std::allocator&lt;bbox_t&gt; &gt;)':
  yolo_console_dll.cpp:(.text._ZN15Tracker_optflow20update_tracking_flowEN2cv3MatESt6vectorI6bbox_tSaIS3_EE[_ZN15Tracker_optflow20update_tracking_flowEN2cv3MatESt6vectorI6bbox_tSaIS3_EE]+0x2aa): undefined reference to `cv::cuda::cvtColor(cv::_InputArray const&amp;, cv::_OutputArray const&amp;, int, int, cv::cuda::Stream&amp;)'
  yolo_console_dll.cpp:(.text._ZN15Tracker_optflow20update_tracking_flowEN2cv3MatESt6vectorI6bbox_tSaIS3_EE[_ZN15Tracker_optflow20update_tracking_flowEN2cv3MatESt6vectorI6bbox_tSaIS3_EE]+0x332): undefined reference to `cv::cuda::cvtColor(cv::_InputArray const&amp;, cv::_OutputArray const&amp;, int, int, cv::cuda::Stream&amp;)'
  /tmp/ccRQih9B.o: In function `main':
  yolo_console_dll.cpp:(.text.startup+0x7d7): undefined reference to `cv::cuda::SparsePyrLKOpticalFlow::create(cv::Size_&lt;int&gt;, int, int, bool)'
  collect2: error: ld returned 1 exit status
  Makefile:155: recipe for target 'uselib' failed
  make: *** [uselib] Error 1
  </code></pre>
  
  <p>I suppose it's a Colab problem,</p>