<div dir="ltr"><div>Hello,</div><div><br></div><div>AS mentiond in the first post I used this install guide for CentOS: <a href="https://trac.ffmpeg.org/wiki/CompilationGuide/Centos">https://trac.ffmpeg.org/wiki/CompilationGuide/Centos</a><br>I followed the path/steps written in the article.</div><div><br></div><div>First I've added --enable-shared to the configure command. This did not gave the result I was looking for. </div><div>--disable-static and --enable-shared were needed.<br>This allowed me to compile the program below with gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic<br></div><div><br></div><div>=================================================================<br>#include <stdio.h><br>#include <stdlib.h><br>#include <libavutil/imgutils.h><br>#include <libavutil/samplefmt.h><br>#include <libavutil/timestamp.h><br>#include <libavformat/avformat.h></div><div>int main()<br>{<br> printf("The echo..n\");<br> return 0;<br>}</div><div>=================================================================</div><div><br></div><div>However, when I added av_register_all(); the program would not compile.<br>To solve this I ran the code below in console.</div><div><br></div><div>=================================================================<br>C_INCLUDE_PATH=/root/ffmpeg_build/include<br>export C_INCLUDE_PATH<br>#debug<br>echo $C_INCLUDE_PATH</div><div>LIBRARY_PATH=/root/ffmpeg_build/lib<br>export LIBRARY_PATH<br>#debug<br>echo $LIBRARY_PATH</div><div>LD_LIBRARY_PATH=/root/ffmpeg_build/lib<br>export LD_LIBRARY_PATH<br>#debug<br>echo $LD_LIBRARY_PATH<br>=================================================================</div><div><br></div><div>Now add av_register_all(); above the printf and I was able to compile the program with:<br>gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic -lavcodec -lavformat -lavutil</div><div><br></div><div>And the example programs compiled as well.</div><div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-24 10:10 GMT+02:00 Nicolas George <span dir="ltr"><<a href="mailto:george@nsup.org" target="_blank">george@nsup.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le sextidi 6 thermidor, an CCXXV, Peter Kroon a écrit :<br>
<span>> e.g. the program below will not compile<br>
><br>
> // gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic -lavcodec<br>
> -lavformat -lavutil<br>
<br>
</span>Without knowing how exactly you installed FFmpeg and the compiler's<br>
output, I can only guess that the paths for includes and libraries (-I<br>
and -L) are not correct.<br>
<br>
Also, I hope you realize that this command-line tells gcc to adhere to a<br>
language that was already obsolete in the last century.<br>
<br>
> 2017-07-24 9:16 GMT+02:00 Peter Kroon <<a href="mailto:plakroon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">plakroon-<wbr>Re5JQEeQqe8AvxtiuMwx3w@public.<wbr>gmane.org</a>>:<br>
<br>
Please do not top-post on these mailing-lists. If you do not know what<br>
it means, look it up.<br>
<br>
Regards,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Nicolas George<br>
</font></span><br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank" rel="noreferrer">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div>