Hemisphere-Project/HPlayer

Fails to compile: libavcodec/opt.h not found

Closed this issue · 2 comments

Following this guide for installing omxplayer on the Raspberry Pi I have installed libpcre3-dev, libavcodec-dev, libavdevice-dev, libavfilter-dev, libavformat-dev, libboost-dev.

When I run make I get the following compilation errors:

../../../addons/ofxOMXPlayer/src/LIBAV_INCLUDES.h:49:29: fatal error: libavcodec/opt.h: No such file or directory compilation terminated. ../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:191: recipe for target 'obj/linuxarmv6l/Release/src/HPlayer.o' failed make[1]: *** [obj/linuxarmv6l/Release/src/HPlayer.o] Error 1 make[1]: Leaving directory '/home/pi/openFrameworks/apps/myApps/HPlayer' ../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:126: recipe for target 'Release' failed make: *** [Release] Error 2

Is it not finding libavcodec? The version I have installed is 6:0.8.13-1 on raspbian wheezy. I'm using a raspberry pi model B+

Hi,

the issue comes from ofxOMXPlayer.

fatal error: libavcodec/opt.h: No such file or directory

To fix that, create a file opt.h in addons/ofxOMXPlayer/libs/ffmpeg/include/libavcodec/ with the following contents:

opt.h
#ifndef AVCODEC_OPT_H
#define AVCODEC_OPT_H
#include "libavcodec/version.h"
#if FF_API_OPT_H
#include "libavutil/opt.h"
#endif
#endif // AVCODEC_OPT_H

Details in the jvcleave's ofxOMXPlayer repo:
jvcleave/ofxOMXPlayer#34

Best Regards,
Thomas

Thanks, that worked perfectly