Loading up the omxplayer.cpp file in vim and it gives me the following error:
omxplayer.cpp|34 col 34| fatal error: libavformat/avformat.h: No such file or directory
This is where the problem is occurring
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>
But I know the files exist:
$ ls -l /usr/lib/libavu*
lrwxrwxrwx 1 root root 28 2013-11-08 13:46 /usr/lib/libavutil.so -> /usr/lib/libavutil.so.51.7.0
lrwxrwxrwx 1 root root 19 2012-06-13 12:38 /usr/lib/libavutil.so.51 -> libavutil.so.51.7.0
-rw-r--r-- 1 root root 117212 2012-06-13 12:38 /usr/lib/libavutil.so.51.7.0
$ ls -l /usr/lib/libavf*
lrwxrwxrwx 1 root root 30 2013-11-08 13:29 /usr/lib/libavformat.so -> /usr/lib/libavformat.so.53.3.0
lrwxrwxrwx 1 root root 21 2012-06-13 12:38 /usr/lib/libavformat.so.53 -> libavformat.so.53.3.0
-rw-r--r-- 1 root root 1053000 2012-06-13 12:38 /usr/lib/libavformat.so.53.3.0
And ldconfig
can also find them:
$ ldconfig -p | grep libavformat && ldconfig -p | grep libavutil
libavformat.so.53 (libc6, hwcap: 0x0008000000008000) => /usr/lib/i686/cmov/libavformat.so.53
libavformat.so.53 (libc6) => /usr/lib/libavformat.so.53
libavutil.so.51 (libc6, hwcap: 0x0008000000008000) => /usr/lib/i686/cmov/libavutil.so.51
libavutil.so.51 (libc6) => /usr/lib/libavutil.so.51
I have read somewhere that ldconfig is for run time whereas ld is for build time, however, in this case I know the libraries are there in /usr/lib, therefore, what could be causing this problem?
omxplayer.cpp|34 col 34| fatal error: libavformat/avformat.h: No such file or directory
Error message says all: It is not in library, But it is header file which is not found. Normal location is /usr/include/libavformat
.
first check by command whether header location is included by g++ -v omxplayer.cpp
, This command will show what all directories are included for header files.
if it dows not show directory containing specified header then you need to specify it's location in g++ -Ipath/to/headers omxplayer.cpp.
command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.