The name of your Java class is CLS_NativeData
. However, in C++ you write:
Java_pkg_1main_CLS_1NativeData_getValue
And use CLS_1NativeData
everywhere. It is misspelled. So the class loader cannot find the native method in your shared library and says java.lang.UnsatisfiedLinkError
.