[FFmpeg-devel] OpenCV filter should be built as C++, and C builds fail since OpenCV 3.4.1
tjoppen at acc.umu.se
Tue Mar 20 22:41:48 EET 2018
tis 2018-03-20 klockan 16:28 +0100 skrev Tobias Rapp:
> On 20.03.2018 16:02, Nicolas George wrote:
> > Derek Buitenhuis (2018-03-19):
> > > If you want to link with a C++ library that is indeed the
> > > 'proper' solution.
> > > As far as I am aware "several languages all have that
> > > requirement" is simply
> > > a theoretical scenario that doesn't actually exist. What else
> > > beside C++
> > > requires this?
> > No, it is not a theoretical scenario: most languages that produce
> > native
> > code have the requirement to produce the final binary using their
> > toolchain. It is true for OCaml: you need to use ocamlopt to
> > produce a
> > binary, even if using a third-party C library; I believe it is true
> > for
> > Rust too.
> Not really. You can compile parts of a program in Rust (as a static
> library) and link it to other parts in C producing the final binary
> e.g gcc.
> > The problem happens when you want to mix several of these
> > languages,
> > because the requirements are incompatible.
> > Fortunately, most people who program in other languages than C are
> > not
> > stupid enough to use them to produce libraries, except for use with
> > that
> > language itself. Except c++ people, for some reason.
> If the libraries don't depend on some run-time environment and
> provide a
> C-compatible ABI, mixing languages (like C, Delphi, Rust) is not a
The problem is that C++ people tend to do exactly this. Some libraries
like gmp/gmpxx do the decent thing and export a C API that is then
wrapped with a header-only C++ template library. That way you get a
stable API and ABI and some nice C++ bells and whistles. But evidently
OpenCV has no such people on board.
More information about the ffmpeg-devel