im attempting to build c++ code with ndk-build but i keep getting this error base operand of '->' has non-pointer type 'JNIEnv <aka _JNIEnv>'
i have tried every solution on the first 2 pages of google with no luck, the ndk just isnt being good to me.
nativemain.h
#ifndef NATIVEMAIN_H
#define NATIVEMAIN_H
#include <string.h>
#include <jni.h>
extern "C"
{
JNIEXPORT jstring JNICALL Java_com_ndktest3_MyRenderer_stringFromJNI( JNIEnv* env,
jobject thiz );
}
#endif
nativemain.cpp
#include <nativemain.h>
JNIEXPORT jstring JNICALL Java_com_ndktest3_MyRenderer_stringFromJNI( JNIEnv* env,
jobject thiz )
{
return env->NewStringUTF("Hello from JNI !");
}
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := nativemain
LOCAL_SRC_FILES := nativemain.cpp
include $(BUILD_SHARED_LIBRARY)