The library file cannot be found for FFmpeg compilation and ffmpeg compilation.
When compiling FFmpeg, use./configure for configuration, and the library file cannot be found often, for about two reasons:
1. No library file is installed or the installed library file version is incorrect.
2. The library file is not found in FFmpeg.
The problem of the former is well solved, as long as the corresponding library is installed, but after the corresponding library is installed, it will usually fall into the latter's trap.
The latter is easy to solve, as long as you tell FFmpeg your library directory, how can you tell it?
In./configure configuration, there are two parameters
- -- Extra-cflags
- -- Extra-ldflags
Point to header files and library files respectively
-- Extra-cflags must add "-I" before the directory, and -- extra-ldflags must add "-L" before the directory"
For example
-- Extra-cflags = "-I/usr/local/include"
-- Extra-ldflags = "-L/usr/local/lib"
If the library file cannot be found during other source code compilation, it should also be the same. because of frequent compilation, do not forget to write down it!