icannotseemtoconfigureopencvtolinktoanon--/usr/libsetoffmpeglibraries。
myld _ library _ pathcontainsadirectlinktothefolderforthecustominstalloffmpeg :
LD _ library _ path=/path to/ffmpeg-0.10.2/lib
Additionally,I've configured pkgconfig as:
pkg _ config _ path=/same path to/ffmpeg-0.10.2/lib/pkgconfig /
withincmakehowevericannotfindanysettingforpathtoffmpeg-eitherinbasicorcustom.theonlysettingrelatedtoffmpegappearstobewith
icanbuildopencvbutitseemstolinktothesystemlibrariesforlibavcodec-thiscausesaconflictasthesystemlibrariesareversion.52 and thth re.53.linkinganapponamachinewithoutthesamesystemlibrariesseemstonotlinktomycustominstallofopenc v
iamnotsureifmyproblemiswithbuildingandlinkingtothewrongversionoffmpegorifissomethingwithmyenvironmentafterbuilding (
I am building on Linux,Redhat 6,OpenCV 2.3.1。
解决方案
Something like
导出LD _ library _ path=/ffmpeg _ install _ path/lib /
export pkg _ config _ path=$ pkg _ config _ path :/ffmpeg _ install _ path/lib/pkgconfig
导出pkg _ config _ libdir=$ pkg _ config _ libdir :/ffmpeg _ install _ path/lib /
should work.atleastitworksforopencv 2.4.xon myubuntu。