Extern C/C++ confusion in ndk - Syntax error Eclipse

旧巷老猫 提交于 2019-12-12 03:38:44


I wish to run a C Code in android for which I am using android ndk. I also need to add some libraries. While building these libraries, I am getting errors because of the extern statements in the header files. Eclipse IDE shows syntax errors. I also unchecked everything at Project-->Properties--> C/C++ Code Analysis.

Similar example is shown here. How to resolve this?

#ifdef __cplusplus
extern "C" {