[FFmpeg-devel] [PATCH] configure: add libm ldflags globally

Jan Ekstrom jeebjp at gmail.com
Tue Oct 17 01:13:03 EEST 2017

On Tue, Oct 17, 2017 at 12:38 AM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> Perhaps such libraries shouldn't hardcode -lstdc++ in there, but
> dynamically put whichever C++ library they built against in there
> instead?
> Its not like you can actually use a static library build with another
> C++ library, that *may* randomly work, but its not something anyone
> should be doing.
> - Hendrik


The project should know which C++ runtime it is built against and put
that into the .pc file's Libs.private. If the project doesn't have an
idea on how to automate this, a solution like the one utilized by zimg
is valid as well:

* Check for an environment variable during configuration and set the
default to `-lstdc++`
* Set that value in your pkg-config template

This way in case the value is incorrect the user can set the
environment variable, and then get what is needed.


More information about the ffmpeg-devel mailing list