Hi everyone,I'm working on an android application that needs javascript support.Then I build a v8 static library and link it to as dynamic library.But nkd comes link error like:
*error: undefined reference to 'v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__ndk1::unique_ptr<v8::TracingController, std::__ndk1::default_delete<v8::TracingController> >)'../../src/base/platform/platform.h:381: error: undefined reference to 'v8::base::Thread::GetThreadLocal(int)'* *...* *error: undefined reference to 'std::__1::__vector_base_common<true>::__throw_length_error() const'* and so on.My v8 version is 7.7.299.6 and i use Ubuntu 18.04.2 to build android library.these are my gn args: *is_component_build = falseis_debug = falsetarget_cpu = "x86"target_os = "android"use_goma = falsev8_static_library = truev8_use_external_startup_data = false* And then I use Android studio on windows 10 to link libraries,ndk version is 20.0.5594570,Android.mk file is as follows: *LOCAL_PATH := $(call my-dir)V8_LIB_PATH := $(ProjectFileDir)/app/src/main/jni/libinclude $(CLEAR_VARS)LOCAL_MODULE := libv8_base_without_compilerLOCAL_SRC_FILES := $(V8_LIB_PATH)/libv8_base_without_compiler.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libv8_libbaseLOCAL_SRC_FILES := $(V8_LIB_PATH)/libv8_libbase.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libv8_libplatformLOCAL_SRC_FILES := $(V8_LIB_PATH)/libv8_libplatform.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libv8_snapshotLOCAL_SRC_FILES := $(V8_LIB_PATH)/libv8_snapshot.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libv8_libsamplerLOCAL_SRC_FILES := $(V8_LIB_PATH)/libv8_libsampler.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libv8_compilerLOCAL_SRC_FILES := $(V8_LIB_PATH)/libv8_compiler.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libicuucLOCAL_SRC_FILES := $(V8_LIB_PATH)/libicuuc.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libicui18nLOCAL_SRC_FILES := $(V8_LIB_PATH)/libicui18n.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libtorque_generated_definitionsLOCAL_SRC_FILES := $(V8_LIB_PATH)/libtorque_generated_definitions.ainclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_C_INCLUDES := $(ProjectFileDir)/app/src/main/jni/includeLOCAL_CFLAGS := -std=c++11LOCAL_STATIC_LIBRARIES := v8_libbase v8_libplatform v8_base_without_compiler libicui18n libicuuc libtorque_generated_definitions v8_libsampler libv8_compiler libv8_snapshotLOCAL_MODULE := testLOCAL_SRC_FILES := $(ProjectFileDir)/app/src/main/jni/test.cppLOCAL_LDLIBS := -llog -landroid -std=c++11include $(BUILD_SHARED_LIBRARY)* --- Application.mk : *APP_MODULES := testAPP_ABI := x86APP_STL := c++_staticAPP_CPPFLAGS := -std=c++11* The source code is just a sample hello-world program from v8/samples/hello-world.cc.Could someone can give me a help? -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAJvF0Q3vVNKBjMHNe-yij-ERJv80n39OVBfSv1%2BQhXff0SoYjA%40mail.gmail.com.