<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Dear all,</p>
<p><br>
</p>
<p></p>
<p class="p1"><span class="s1">I am writing a C++ library which is based on OpenCV. I want to use it in a Ffmpeg filter (written in C), so I write a wrapper of the library using C. The wrapper consists of a C header file and some C functions which call the
 C++ functions (in the C++ files). I expect the FFmpeg filter to only include the C header and call the C functions.</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">I have built the library as a standalone one, which can be considered as an external library to FFmpeg. I have added it to the DEPENDENCIES list of FFmpeg, together with other external libraries, like openjpeg. I have also added
 "'--extra-libs=-lstdc++ -lmylibrary' together with other args, like '--enable-libopenjpeg'. </span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">However, I get the following error when compiling FFmpeg:</span></p>
<p class="p1"><span class="s1">.../binutils/2.25/centos6-native/da39a3e/bin/ld: .../mylibrary/0.1/gcc-4.9-glibc-2.20/80414d5/lib/libmylibrary.a(mylibrary_file.cpp.o): undefined reference to symbol '_ZdlPv@@GLIBCXX_3.4'</span></p>
<p class="p1"><span class="s1">.../libgcc/4.9.x/gcc-4.9-glibc-2.20/024dbc3/lib/libstdc++.so: error adding symbols: DSO missing from command line</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">Here, I tried gcc-4.9-glibc-2.20 and other versions but got the same results.</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">I wonder if I missed anything.</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">Thanks a lot for your help!</span></p>
<br>
<p></p>
<p>Rich</p>
</div>
</body>
</html>