Mark library functions as "C" linkage
The documentation disclaims support for building with a C++ compiler, so it is reasonable to assume that the library will be built with a plain C compiler, so the functions will all have plain C linkage. By default, a C++ application that wished to use libiniparser would need to wrap the inclusion of libiniparser headers in 'extern "C" { ... }' to reflect the C linkage of libiniparser. Instead, place that marker directly in the libiniparser headers, so that client applications do not need to care. This has no effect on normal compilation of libiniparser, since the new markers are inside a '#ifdef __cplusplus' guard, and straight C compilers do not define __cplusplus.
Showing
想要评论请 注册 或 登录