<meta http-equiv="content-type" content="text/html; charset=utf-8">Hi,guys, I now install a library named omnimeeting, which use live555 ,ffmpeg and opencv as former library.<div>There is nothing wrong when install, but I meet error when linking the library. Here is the error information:</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>/usr/local/lib/libomnistream.so: undefined reference to `av_set_parameters(AVFormatContext*, AVFormatParameters*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `av_open_input_file(AVFormatContext**, char const*, AVInputFormat*, int, AVFormatParameters*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::wasLoopedBackFromUs(UsageEnvironment&, sockaddr_in&)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `av_find_stream_info(AVFormatContext*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `HashTable::create(int)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `HashTable::RemoveNext()'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::~Groupsock()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_find_encoder(CodecID)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_find_decoder(CodecID)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_alloc_context()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::removeAllDestinations()'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_close(AVCodecContext*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `av_read_frame(AVFormatContext*, AVPacket*)'</div><div>
/usr/local/lib/libomnistream.so: undefined reference to `avcodec_alloc_frame()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::Groupsock(UsageEnvironment&, in_addr const&, Port, unsigned char)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_encode_audio(AVCodecContext*, unsigned char*, int, short const*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `guess_format(char const*, char const*, char const*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `HashTable::Iterator::create(HashTable&)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_init()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `strDup(char const*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `av_close_input_file(AVFormatContext*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_decode_video(AVCodecContext*, AVFrame*, int*, unsigned char const*, int)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_register_all()'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `sws_freeContext(SwsContext*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `av_free(void*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `sws_scale(SwsContext*, unsigned char**, int*, int, int, unsigned char**, int*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `av_alloc_format_context()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `avpicture_fill(AVPicture*, unsigned char*, int, int, int)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::removeDestination(in_addr const&, Port const&)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `av_register_all()'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `avformat_alloc_context()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::addDestination(in_addr const&, Port const&)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `av_new_stream(AVFormatContext*, int)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::multicastSendOnly()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `avpicture_get_size(int, int, int)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::changeDestinationParameters(in_addr const&, Port, int)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::Groupsock(UsageEnvironment&, in_addr const&, in_addr const&, Port)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `strDupSize(char const*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `avcodec_encode_video(AVCodecContext*, unsigned char*, int, AVFrame const*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `av_find_input_format(char const*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::output(UsageEnvironment&, unsigned char, unsigned char*, unsigned int, DirectedNetInterface*)'</div>
<div><br></div><div>I search for a solution for linking error about ffmpeg library:</div><div><div><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; ">extern "C" { </span></div><div>
<font face="Verdana, Arial, Helvetica, sans-serif" size="3"><span style="font-size: 12px; "><div>#define __STDC_CONSTANT_MACROS </div><div>#include <libavcodec/avcodec.h></div><div>#include <libavformat/avformat.h></div>
<div>}</div><div><br></div><div>And now the function in two libraries is ok, but still errors about others:</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; "><div>
/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::wasLoopedBackFromUs(UsageEnvironment&, sockaddr_in&)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `HashTable::create(int)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `HashTable::RemoveNext()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::~Groupsock()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::removeAllDestinations()'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::Groupsock(UsageEnvironment&, in_addr const&, Port, unsigned char)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `HashTable::Iterator::create(HashTable&)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `strDup(char const*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `sws_freeContext(SwsContext*)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `sws_scale(SwsContext*, unsigned char**, int*, int, int, unsigned char**, int*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::removeDestination(in_addr const&, Port const&)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::addDestination(in_addr const&, Port const&)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::multicastSendOnly()'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::changeDestinationParameters(in_addr const&, Port, int)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::Groupsock(UsageEnvironment&, in_addr const&, in_addr const&, Port)'</div>
<div>/usr/local/lib/libomnistream.so: undefined reference to `strDupSize(char const*)'</div><div>/usr/local/lib/libomnistream.so: undefined reference to `Groupsock::output(UsageEnvironment&, unsigned char, unsigned char*, unsigned int, DirectedNetInterface*)'</div>
<div><br></div><div>These errors are mostly about the live555 libraries. And I'm confused again.</div><div>Could someone do me a favor?</div></span></div></span></font></div></div></span></div>