<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></p>
<p class="p1"><span class="s1">No problem at all, Perette. Appreciate your suggestion.</span></p>
<p class="p1"><span class="s1"><br>
</span></p>
<p class="p1"><span class="s1">Sorry, I am new to compliers and must miss something. I have a file which controls the compilation and makefile. Followed is my settings to compile FFmpeg:</span></p>
<p class="p1"><br>
</p>
<p class="p3"><span class="s1">    conf.env['CXXFLAGS'].append('-fPIC')</span></p>
<p class="p3"><span class="s1">    conf.env['CXXFLAGS'].append('-DPIC')</span></p>
<p class="p3"><span class="s1">    ...</span></p>
<p class="p4"><span style="font-size: 12pt;">    extra_args += ['--enable-libopencore-amrnb',</span><br>
</p>
<p class="p5"><span class="s2">                 </span><span class="s1">  '--extra-cflags=%s %s' % (conf.env['CFLAGS'], conf.env['CPPFLAGS']),</span></p>
<p class="p3"><span class="s1">                   '--extra-cxxflags=%s %s' % (conf.env['CXXFLAGS'], conf.env['CPPFLAGS']),</span></p>
<p class="p3"><span class="s1">                   '--extra-ldflags=%s' % (conf.env['LDFLAGS'],),</span></p>
<p class="p3"><span class="s1">                   '--extra-libs=-L /lib64 -lstdc++ -lmylibrarytest',</span></p>
<p class="p3"><span class="s1">                   ]   </span></p>
<p></p>
<div id="Signature">
<p><a href="http://aka.ms/weboutlook" id="LPNoLP"></a><br>
</p>
</div>
  However, I got the following error: 
<p class="p1"><span class="s1">.../binutils/2.25/centos6-native/da39a3e/bin/ld: .../mylibrary/0.1/gcc-4.9-glibc-2.20-fb/8fd4fe1/lib/libmylibrary.a(my_file.cpp.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with
 -fPIC</span></p>
<p class="p1"><span class="s1">.../mylibrary/0.1/gcc-4.9-glibc-2.20/8fd4fe1/lib/libmylibrary.a: error adding symbols: Bad value</span></p>
<br>
Looks like there is a problem when I compile my library such that there is the above error when compiling FFmpeg?
<div><br>
</div>
<div>Thanks.</div>
<div><br>
</div>
<div><br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> Libav-user <libav-user-bounces@ffmpeg.org> 代表 Perette Barella <perette@barella.org><br>
<b>发送时间:</b> 2016年9月3日 16:34<br>
<b>收件人:</b> This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.<br>
<b>主题:</b> Re: [Libav-user] 答复: 答复: 答复: Are there any ways to use a lib (built from C++ OpenCV) in Ffmpeg filter?</font>
<div> </div>
</div>
<div>
<div>
<blockquote type="cite" class="">
<div id="divtagdefaultwrapper" class="" style="font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; font-size:12pt; background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif">
<div class="" style="margin-top:0px; margin-bottom:0px">Should it still be the compilation setting issue, when compiling my library or compiling FFmpeg?</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>When you do the final link, are you using the C or C++ compiler?  You need to use the C++ one.</div>
<div><br class="">
</div>
<div>So:</div>
<div>1.  C++ etc to make the library</div>
<div>2. cc -c your_files.c</div>
<div>3. C++ -llibrary your_files.o</div>
</div>
<br class="">
<div class="">In these errors:</div>
<div class="">
<div class="" style="margin-top:0px; margin-bottom:0px; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">
</div>
</div>
<blockquote type="cite" class="">
<div class="">
<div class="" style="margin-top:0px; margin-bottom:0px; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">
<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></div>
<div class="" style="margin-top:0px; margin-bottom:0px; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">
<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></div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">“glibcxx” suggests it’s missing the C++ support library, like if you’re linking with cc instead of c++ compiler.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">And sorry about dropping the tar on the list earlier, I thought I was replying off list.  My bad.</div>
<div class=""><br class="">
</div>
<div class="">Perette</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
</div>
</body>
</html>