[Libav-user] Compile with g++

James Board jpboard2 at yahoo.com
Tue Oct 8 20:12:28 CEST 2013


>"How difficult would it be to compile the examples in the doc/examples
>directory with a C++ compiler?"
>
>Those are C programs, so just use a C compiler for them.  That's all I 
>meant.

Okay, I understand.  Yes they are just C programs, so I can compile with
the C compiler.  But my C++ programs with libav subroutine calls won't
compile and the error messages I receive are the same as when I try to compile
the doc/examples with C++.  So, rather then posting my C++ code, it's easier
to debug the problems by merely trying to compile the doc/examples with the
C++ compiler
 
>So I just added it myself, around my C includes:
>
>extern "C" {
>#include "libavformat/avformat.h"
>etc...
>}

I tried exactly that with the demuxing.c example.  When I try to compile
it with the C++ compiler, I get errors.  When I compile with the C compiler,
no errors.  What do I need to do to get demuxing.c to compile with the C++
compiler in Linux?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131008/4f4a1ebb/attachment.html>


More information about the Libav-user mailing list