Version: 1.3
语言 : 中文
Introducing native plug-ins for OpenHarmony
Import a native plug-in for OpenHarmony

Create a native plug-in for OpenHarmony

To compile a C++ plug-in for OpenHarmony, use the OpenHarmony SDK and familiarize yourself with the steps required to build a shared library or a static library.

If you use C++ to implement the plug-in, you must declare with C linkage to avoid name mangling issues. By default, only C source files that have a .c file extension in the plug-ins have C linkage (not C++).

extern "C" {
  float Foopluginmethod ();
}

Other resource

Import a native plug-in for OpenHarmony

Introducing native plug-ins for OpenHarmony
Import a native plug-in for OpenHarmony