This is a .cpp file, and the code
JNIEXPORT jint JNICALL Java_com_example_compute_MainActivity_AddNumbers(JNIEnv *env, jobject obj, jint v1, jint v2)
{
_android_log_print(ANDROID_LOG_VERBOSE, "VaxVoIP", "The value of 1 + 1 is %d", 1+1);
return -1;
}
This is the Android.mk file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
Here we give our module name and source file.
LOCAL_MODULE := add
LOCAL_LDLIBS := -llog
LOCAL_SRC_FILES := add.cpp\
add.h\
include $(BUILD_SHARED_LIBRARY)
And another error I'm trying to solve is to make a .so file
_android_log_print(ANDROID_LOG_VERBOSE, "VaxVoIP", "The value of 1 + 1 is %d", 1+1);
was not declared in this scope
source
share