<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt;  4.0.0-pre</li>
<li>Operating System / Platform =&gt; Windows 64 Bit</li>
<li>Compiler =&gt; MinGW g++ (tdm-1) 5.1.0 from codeblocks</li>
</ul>

<h5 dir="auto">Detailed description</h5>
<p dir="auto">I built OpenCV from source using MinGW which was shipped along with codeblocks.<br>
My build and install was successful.<br>
<a href="https://imgur.com/a/IWFrXc7" rel="nofollow">https://imgur.com/a/IWFrXc7</a></p>
<p dir="auto">Now, to check my built library I ran a sample program</p>
<h2 dir="auto"><strong>OpenCVTest.cpp</strong></h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include &lt;iostream&gt;
#include &lt;opencv2/core/core.hpp&gt;
#include &lt;opencv2/highgui/highgui.hpp&gt;
#include &lt;opencv2/imgproc/imgproc.hpp&gt;

using namespace cv;
using namespace std;

int main( )
{    
  // Create black empty images
  Mat image = Mat::zeros( 400, 400, CV_8UC3 );

  // Draw a line 
  line( image, Point( 15, 20 ), Point( 70, 50), Scalar( 110, 220, 0 ),  2, 8 );
  imshow(&quot;Image&quot;,image);
  cout&lt;&lt;&quot;******************&quot;;
  waitKey( 0 );
  return(0);
} 
"><pre class="notranslate"><code class="notranslate">#include &lt;iostream&gt;
#include &lt;opencv2/core/core.hpp&gt;
#include &lt;opencv2/highgui/highgui.hpp&gt;
#include &lt;opencv2/imgproc/imgproc.hpp&gt;

using namespace cv;
using namespace std;

int main( )
{    
  // Create black empty images
  Mat image = Mat::zeros( 400, 400, CV_8UC3 );

  // Draw a line 
  line( image, Point( 15, 20 ), Point( 70, 50), Scalar( 110, 220, 0 ),  2, 8 );
  imshow("Image",image);
  cout&lt;&lt;"******************";
  waitKey( 0 );
  return(0);
} 

</code></pre></div>
<p dir="auto">using cmd -</p>
<p dir="auto"><code class="notranslate">g++ -std=c++11 OpenCVTest.cpp -llibopencv_core400 -llibopencv_highgui400 -llibopencv_imgproc400</code></p>
<p dir="auto">I am able to compile to source code, but on running the program, I am getting a window pop up with <strong>program has stopped working</strong> message</p>
<p dir="auto"><a href="https://imgur.com/a/fXihGc8" rel="nofollow">https://imgur.com/a/fXihGc8</a></p>
<h5 dir="auto">Steps to reproduce</h5>
<ol dir="auto">
<li>Downloaded the source code from github.</li>
<li>Using CMake, pointed the source code directory and the build directory.</li>
<li>Ran CMake and it generated some file and folders in build directory.</li>
<li>Ran <strong>mingw32-make</strong> command in build directory.</li>
<li>Ran <strong>mingw32-make install</strong>.</li>
<li>Copied the folder <code class="notranslate">opencv2</code> in <code class="notranslate">D:\Programs\OpenCV-Source\build\install\include</code>  to  <code class="notranslate">C:\Program Files (x86)\CodeBlocks\MinGW\include</code></li>
<li>Copied the files (.dll)  from <code class="notranslate">D:\Programs\OpenCV-Source\build\install\x86\mingw\bin</code>   to  <code class="notranslate">C:\Windows\SysWOW64</code></li>
<li>Copied the files (.a files) from <code class="notranslate">D:\Programs\OpenCV-Source\build\install\x86\mingw\lib</code>  to  <code class="notranslate">C:\Program Files (x86)\CodeBlocks\MinGW\lib</code></li>
<li>Wrote the above program on FAR Manager.</li>
<li>compiled on cmd using <code class="notranslate">g++ -std=c++11 OpenCVTest.cpp -llibopencv_core400 -llibopencv_highgui400 -llibopencv_imgproc400</code></li>
<li>produced <code class="notranslate">a.exe</code>. Ran it and got the error.</li>
</ol>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; :4.1</li>
<li>Operating System / Platform =&gt; :Ubuntu 18.04 x64</li>
<li>Compiler =&gt; GCC 7.4, NVCC 10.1</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">problem when loading opencv library, error says realloc(): invalid old size, this happened for opencv_videoio library when either ffmpeg or gstreamer ON, and opencv_highgui library when GTK ON (i haven't tested it with VTK ON), all build are with CUDA enabled (CUDA 10.1), glib2.0-dev</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">build opencv with opencv_contrib, CUDA enabled (10.1) and glib2.0, then try to link an executable with opencv_videoio or opencv_highgui (either static or dynamic through dlopen)</p>