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:
conf.env['CXXFLAGS'].append('-fPIC')
conf.env['CXXFLAGS'].append('-DPIC')
...
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',
]
<http://aka.ms/weboutlook>
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?
Thanks.
________________________________
发件人: Libav-user <[email protected]> 代表 Perette Barella
<[email protected]>
发送时间: 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.
So:
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.
Perette
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user