#9696 closed enhancement (wontfix)
Use extern "C" in headers
Reported by: | jgcodes2020 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | 4.4.3 | Keywords: | |
Cc: | jgcodes2020 | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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.
Note:
See TracTickets
for help on using tickets.
FFmpeg is not a c++ program, we make no effort to make the headers compatible, we will not pretend we do. If you want to use FFmpeg in a c++ project, include the headers as you see fit, and maybe you will be lucky.