Hi,
On Thu, Nov 27, 2008 at 5:56 AM, Smart, Gary <[EMAIL PROTECTED]> wrote:
> Does anyone know how to compile C++ programs with the ffmpeg API? I
> notice that there are no extern "C" statements in the headers but even
> when this is addressed, I still get link errors along the lines of:
>
> "...undefined reference to __gxx_personality_v0" ,
>
> which seems to arise within some temporary '.o' file in /tmp.
- compile the C library as normal using gcc
- include the C (*.h) headers like this:
extern "C" {
#include <libavcodec/avcodec.h>
}
- compile the C++ files as normal using g++
Don't compile C files using C++ compilers (e.g. g++), it will change
their symbol names. Don't forget the extern "C", that is meant to
prevent symbol name-changes in the lavc functions being linked to from
within the C++ app. If you do all of these correctly, it should work
just fine.
If it doesn't work, please provide some compiler commands that you're
using to compile ffmpeg, your c++ app and the c++ app code.
Ronald
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user