[Libav-user] Linking with libav*

Simon Brown simon.k.brown at gmail.com
Tue Aug 13 15:11:28 EEST 2019

I have a modified version of the demuxing_decoding.c program (with ffmpeg
from the latest git head), that I copied into a C++ file (to link it with
other software that requires C++).  The program compiles, but when linking
it fails to find the libraries, so produces undefined references to all the
av calls that I make.

My compile and link script is:
gcc -o demux_decode demux_decode.cpp -L/usr/local/lib -lavformat ....
(sorry, my VM has crashed and I can't copy/paste at the moment)

Is there any issue linking C libraries with C++?  Is there anything else I
should be doing?  I had assumed it was a "shared-object" problem, and
rebuilt everything with --enable-shared set, but that hasn't solved it.

Any advice greatly appreciated,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190813/3b401098/attachment.html>

More information about the Libav-user mailing list