文章目录 1.so源文件 1.1 NaviteCode.h 1.2 NaviteCode.cpp 2.调用方法 Unity中C#调用so文件中返回字符串。 1.so源文件 1.1 NaviteCode.h #ifndef __NativeCode_H__ #define __NativeCode_H__ #if 0 #define EXPORT_DLL __declspec(dllexport) //导出dll声明 #else #define EXPORT_DLL #endif extern "C" { EXPORT_DLL int MyAddFunc(int _a, int _b); EXPORT