Android.mk Undefined Reference to "xxxx" -
i trying create 2 file ndk-build
libkdu_jni.so uses libkdu_v75r.so
i can create libkdu_v75r.so couldnt create libkdu_jni.so
here android.mk:
local_path := $(call my-dir) include $(clear_vars) local_module := libkdu_v75r local_src_files := kdu_arch.cpp \ kdu_threads.cpp \ mq_encoder.cpp \ mq_decoder.cpp \ block_coding_common.cpp \ block_encoder.cpp \ block_decoder.cpp \ encoder.cpp \ decoder.cpp \ ssse3_coder_local.cpp \ avx_coder_local.cpp \ compressed.cpp \ codestream.cpp \ blocks.cpp \ kernels.cpp \ messaging.cpp \ params.cpp \ colour.cpp \ ssse3_colour_local.cpp \ avx_colour_local.cpp \ avx2_colour_local.cpp \ analysis.cpp \ synthesis.cpp \ multi_transform.cpp \ ssse3_dwt_local.cpp \ avx2_dwt_local.cpp \ roi.cpp \ neon_coder_local.cpp \ neon_colour_local.cpp \ neon_dwt_local.cpp include $(clear_vars) local_module := libkdu_jni local_src_files := kdu_jni.cpp \ kdu_aux.cpp \ args.cpp \ jp2.cpp \ jpb.cpp \ jpx.cpp \ mj2.cpp \ kdu_tiff.cpp \ kdu_region_decompressor.cpp \ ssse3_region_decompressor.cpp \ kdu_region_compositor.cpp \ kdu_stripe_decompressor.cpp \ kdu_stripe_compressor.cpp \ ssse3_stripe_transfer.cpp \ avx2_stripe_transfer.cpp \ kdu_cache.cpp \ kdcs_comms.cpp \ kdu_client_window.cpp \ kdu_client.cpp \ kdu_clientx.cpp \ kdu_serve.cpp \ kdu_servex.cpp local_shared_libraries := libkdu_v75r include $(build_shared_library)
errors :
android ndk: warning: app_platform android-21 larger android:minsdkversion 8 in ./androidmanifest.xml [armeabi-v7a] compile++ thumb: kdu_jni <= args.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= jp2.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= jpb.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= jpx.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= mj2.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_tiff.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_region_decompressor.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= ssse3_region_decompressor.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_region_compositor.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_stripe_decompressor.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_stripe_compressor.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= ssse3_stripe_transfer.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= avx2_stripe_transfer.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_cache.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdcs_comms.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_client_window.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_client.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_clientx.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_serve.cpp [armeabi-v7a] compile++ thumb: kdu_jni <= kdu_servex.cpp [armeabi-v7a] sharedlibrary : libkdu_jni.so jni/kdu_threads.h:2978: error: undefined reference 'kdu_core::kdu_thread_queue::~kdu_thread_queue()' jni/kdu_threads.h:3173: error: undefined reference 'kdu_core::kdu_thread_queue::schedule_job(kdu_core::kdu_thread_job*, kdu_core::kdu_thread_entity*, bool, int)' **i cut part** jni/kdu_region_compositor.cpp:2066: error: undefined reference 'kdu_core::kdu_codestream::set_persistent()' jni/kdu_region_compositor.cpp:2067: error: undefined reference 'kdu_core::kdu_codestream::augment_cache_threshold(int)' jni/kdu_region_compositor.cpp:2089: error: undefined reference 'kdu_core::kdu_codestream::set_persistent()' jni/kdu_region_compositor.cpp:2090: error: undefined reference 'kdu_core::kdu_codestream::augment_cache_threshold(int)' jni/kdu_region_compositor.cpp:2108: error: undefined reference 'kdu_core::kdu_codestream::restart(kdu_core::kdu_compressed_source*, kdu_core::kdu_thread_env*)' jni/kdu_region_compositor.cpp:2139: error: undefined reference 'kdu_core::kdu_codestream::change_appearance(bool, bool, bool, kdu_core::kdu_thread_env*)' jni/kdu_region_compositor.cpp:2140: error: undefined reference 'kdu_core::kdu_codestream::apply_input_restrictions(int, int, int, int, kdu_core::kdu_dims*, kdu_core::kdu_component_access_mode, kdu_core::kdu_thread_env*)' jni/kdu_region_compositor.cpp:2173: error: undefined reference 'kdu_core::kdu_thread_env::cs_terminate(kdu_core::kdu_codestream, int*)' jni/kdu_region_compositor.cpp:2679: error: undefined reference 'kdu_core::kdu_codestream::set_fast()' jni/kdu_region_compositor.cpp:2680: error: undefined reference 'kdu_core::kdu_codestream::set_fussy()' jni/kdu_region_compositor.cpp:2682: error: undefined reference 'kdu_core::kdu_codestream::set_resilient(bool)' jni/kdu_region_compositor.cpp:2778: error: undefined reference 'kdu_core::kdu_codestream::apply_input_restrictions(int, int, int, int, kdu_core::kdu_dims*, kdu_core::kdu_component_access_mode, kdu_core::kdu_thread_env*)' jni/kdu_region_compositor.cpp:2781: error: undefined reference 'kdu_core::kdu_codestream::get_num_components(bool)' kdu_core::kdu_codestream_comment::get_text()' collect2.exe: error: ld returned 1 exit status /cygdrive/c/android-ndk-r10e/build/core/build-binary.mk:664: recipe target 'obj/local/armeabi-v7a/libkdu_jni.so' failed make: *** [obj/local/armeabi-v7a/libkdu_jni.so] error 1
i cut parts of error, because s long.
i trying create multiple .so file, firstly v75 kdu_jni.so.
because, kdu_jni uses v75.
how can fix android.mk.
we used below include static library while building using ndk-build.
include $(clear_vars) local_module := libabc local_src_files := <path>/libabc.a include $(prebuilt_static_library)
i'm not sure whether works you.
Comments
Post a Comment