Jasper Leemans wrote:
> first of all, I did forget about the extern C stuff,
> although in Linux I had no problems including the avcodec.h file the normal
> way,
> the proper way is:
>
> extern "C" {
> #include "libavcodec/avcodec.h"
> }
>
> This got rid of almost all errors except undefined reference to av_free(),
> I fixed this by including -lavutil.
>
> why my code compiles on linux without -lavutil still remains a mistery
> (version related?).
If I remember well, the ELF format used by Linux tools allow to link
.so files with other .so files. So, libavcodec.so is linked with
libavutil.so during ffmpeg build, and you do not need to explicitly
link libavutil.so.
Maybe OS X tools do not allow similar tricks, or you are linking static
libraries on OS X?
Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user