[Libav-user] segmentation fault on avcodec_decode_video2( ) call
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu Mar 13 07:55:05 CET 2014
Jason Blum <jason.j.blum at ...> writes:
> I'm still in the dark about why I can't link to static .a
> libraries, but I'll look into that offline.
Just put your static libraries on the compile line
of your own program just like you would put an
object file there:
$ gcc main.cpp -o main -g -D__STDC_CONSTANT_MACROS
/path/to/libavformat.a /path/to/libavcodec.a ...
> This makes that error go away. Now I get another
> type of error entirely.
> ./main: error while loading shared libraries:
> libavcodec.so.55: cannot open shared object file:
> No such file or directory
The above also fixes this problem, the alternative is
to fix LD_LIBRARY_PATH.
More information about the Libav-user