[FFmpeg-trac] #9696(undetermined:new): Use extern "C" in headers

FFmpeg trac at avcodec.org
Wed Mar 23 17:56:35 EET 2022


#9696: Use extern "C" in headers
-------------------------------------+-------------------------------------
             Reporter:  jgcodes2020  |                     Type:
                                     |  enhancement
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  4.4.1
  undetermined                       |
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 All FFmpeg headers should begin and end as follows:
 {{{
 // _GUARD_MACRO_ should be replaced with the header's specific guard macro
 #ifndef _GUARD_MACRO_
 #define _GUARD_MACRO_
 #ifdef __cplusplus
 extern "C" {
 #endif

 // header code goes here

 #ifdef __cplusplus
 }
 #endif
 #endif
 }}}

 The extern "C" block ensures that FFmpeg's symbols are treated as C
 symbols in C++, thus removing the need to manually place them in an extern
 "C" block.

 Since this ticket applies to more than one component it has been left as
 undetermined.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9696>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list