[Libav-user] 答复: 答复: 答复: 答复: Are there any ways to use a lib (built from C++ OpenCV) in Ffmpeg filter?

R n flynewdream at hotmail.com
Sat Sep 3 22:13:31 EEST 2016

No problem at all, Perette. Appreciate your suggestion.

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:




    extra_args += ['--enable-libopencore-amrnb',

                   '--extra-cflags=%s %s' % (conf.env['CFLAGS'], conf.env['CPPFLAGS']),

                   '--extra-cxxflags=%s %s' % (conf.env['CXXFLAGS'], conf.env['CPPFLAGS']),

                   '--extra-ldflags=%s' % (conf.env['LDFLAGS'],),

                   '--extra-libs=-L /lib64 -lstdc++ -lmylibrarytest',



  However, I got the following error:

.../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

.../mylibrary/0.1/gcc-4.9-glibc-2.20/8fd4fe1/lib/libmylibrary.a: error adding symbols: Bad value

Looks like there is a problem when I compile my library such that there is the above error when compiling FFmpeg?


发件人: Libav-user <libav-user-bounces at ffmpeg.org> 代表 Perette Barella <perette at barella.org>
发送时间: 2016年9月3日 16:34
收件人: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.
主题: Re: [Libav-user] 答复: 答复: 答复: Are there any ways to use a lib (built from C++ OpenCV) in Ffmpeg filter?

Should it still be the compilation setting issue, when compiling my library or compiling FFmpeg?

When you do the final link, are you using the C or C++ compiler?  You need to use the C++ one.

1.  C++ etc to make the library
2. cc -c your_files.c
3. C++ -llibrary your_files.o

In these errors:
.../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'
.../libgcc/4.9.x/gcc-4.9-glibc-2.20/024dbc3/lib/libstdc++.so: error adding symbols: DSO missing from command line

“glibcxx” suggests it’s missing the C++ support library, like if you’re linking with cc instead of c++ compiler.

And sorry about dropping the tar on the list earlier, I thought I was replying off list.  My bad.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160903/7e2df959/attachment.html>

More information about the Libav-user mailing list