[x265] Problem with linking x265 and ffmpeg

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon Apr 21 19:07:30 CEST 2014


On 4/21/2014 5:37 AM, 宮村 公男 wrote:
> Here’s his comment:
> “In order to be able to link libx265 to ffmpeg it requires -lstdc++ as a compiler flag yet it does not provide it via pkg-config when ffmpeg asks for the -cflags of libx265. It should add -lstdc++ to its Libs: line of the x265.pc file.”

-lc++ *IS ADDED* if pkg-config is invoked with --static 
during configure, which is what this configure option does.

Did you actually even try it? I get the feeling you didn't.

> So x265.pc should be as follows:
> --- a/x265.pc	2014-04-16 14:50:20.000000000 +0900
> +++ b/x265.pc	2014-04-21 10:54:32.000000000 +0900
> @@ -6,6 +6,6 @@
> Name: x265
> Description: H.265/HEVC video encoder
> Version: 0.9
> -Libs: -L${libdir} -lx265
> +Libs: -L${libdir} -lx265 -lstdc++
> Libs.private: -lc++ -l/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/lib/darwin/libclang_rt.osx.a
> Cflags: -I${includedir}

Incorrect. You are adding the wrong C++ stdlib. See my 
explanation above.

- Derek


More information about the x265-devel mailing list