Sorry not being truly C++.
How to create/compile our own libffmpeg.so supporting H264 (or H265 too) codec, just as instruction on https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
is for standalone executable build, no dynamic link build explanation was found.
Thanks much
What I remember is running make after ./configure and building both the executables as well as the libraries. I don't remember having to do anything special.