Keroro wrote:

You need to supply variable names for all your function parameters, not
just jinit j.


> Why build error?
>
> build and Error Message:
> ../mydroid$ make libmax
> target thumb C: libmax <= development/max/max.c
> development/max/max.c: In function 'Java_testdll_set':
> development/max/max.c:7: error: parameter name omitted
> development/max/max.c:7: error: parameter name omitted
> make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/
> libmax_intermediates/max.o] Error 1
>
> code as follows:
>
> max.c
> =======================================================================
> #include <jni.h>
> JNIEXPORT void JNICALL Java_testdll_set (JNIEnv *, jclass, jint);
>
>  int i = 0;
>
>     JNIEXPORT void JNICALL Java_testdll_set (JNIEnv *, jclass, jint
> j)
>       {
>        i = j;
>       }
> =======================================================================
>
> Android.mk
> ================================
> LOCAL_PATH:= $(call my-dir)
>
> include $(CLEAR_VARS)
>
> LOCAL_SRC_FILES:= \
>
>     max.c
>
> LOCAL_C_INCLUDES := \
>
>     $(JNI_H_INCLUDE)
>
> LOCAL_SHARED_LIBRARIES := \
>
>     libutils
>
> LOCAL_PRELINK_MODULE := false
>
> LOCAL_MODULE := libmax
>
> include $(BUILD_SHARED_LIBRARY)
> ==================================
>
> >   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to