The FFI library can only bind against C symbols,
so in C++ these symbols must be marked extern C.
You should also add attributes to indicate that the
symbols are referenced from Dart,
to prevent the linker from discarding the symbols
during link-time optimization.

On Android, you need to create a CMakeLists.txt file
to define how the sources should be compiled and point
Gradle to it. From the root of your project directory,
use the following instructions

cat

> android/CMakeLists.txt

<<

EOF

cmake_minimum_required(VERSION 3.4.1)  # for example

add_library( native_add

             # Sets the library as a shared library.
             SHARED

             # Provides a relative path to your source file(s).
             ../ios/Classes/native_add.cpp )

EOF