Macros are string substitution for code. It happens during the preprocessing phase. It is generally not encouraged in c++ nowadays. However, there are still applications where it could be handy / necessary
This is effectively extern "C" void cvFindExtrinsicCameraParams2(...){} and void cvFindExtrinsicCameraParams2(...){}.
extern "C" is a “linkage specifier”. In C++, function names are mangled so they will be unique in the object code. E.g., foo() could become _fooid1(). This is also the underlying mechanism for function overloading. However, C does not have function overloading. So, when linking C code in C++, we need to make sure names of function symbols are unique, and exclude name mangling.
Compiler Args
Life cycle of adding a compiler arg:
“turn on” a preprocessor‐symbol by passing -D<NAME> to the compiler.