[FFmpeg-trac] #3626(undetermined:closed): add 'extern "C"' to headers
FFmpeg
trac at avcodec.org
Fri Jul 12 14:09:24 EEST 2024
#3626: add 'extern "C"' to headers
-------------------------------------+-------------------------------------
Reporter: spraff | Owner: (none)
Type: defect | Status: closed
Priority: wish | Component:
| undetermined
Version: unspecified | Resolution: wontfix
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by jwakely):
Could this wontfix decision be revisited? Would you accept a patch to add
the necessary boilerplater?
The current situation causes every C++ project that uses ffmpeg headers to
deal with it, which then causes other problems downstream. The documented
way to include ffmpeg headers from C++ sources violates the C++ standard.
The standard says you can't include any standard header (such as
{{{<math.h>}}}) inside an {{{extern "C"}}} declaration.
Which C99 features are used which would cause a problem? Apparently it
''doesn't'' cause a problem, because many C++ projects such as Qt do
include the headers. But they have to violate the C++ standard to do so,
and the fall out from that can be harder for those projects to work around
(it requires changes in the C++ standard library implementation to
accommodate your policy).
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3626#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list