undefined reference to
作者:互联网
https://github.com/NativeScript/android-v8/issues/20
nm -gAC libv8.a | grep "v8::platform::NewDefaultPlatform"
libv8.a:default-platform.o:0000000000000000 T v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__Cr::unique_ptr<v8::TracingController, std::__Cr::default_delete<v8::TracingController> >)
err
/usr/bin/ld: ./so/libv8a1.so: undefined reference to `v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::unique_ptr<v8::TracingController, std::default_delete<v8::TracingController> >)'
You can try searching the exported symbols from the static library using :nm
nm -gAC libv8.a | grep "v8::platform::NewDefaultPlatform"
通常,您应该看到以下输出:
libv8.a:default-platform.o:0000000000000000 T v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__Cr::unique_ptr<v8::TracingController, std::__Cr::default_deletev8::TracingController >)
如您所见,此版本中使用了一些不同的命名空间:
std::__Cr::unique_ptr
而不是
std::__ndkCr::unique_ptr
错误消息似乎表明您没有在 v8 生成期间使用的项目中使用自定义 libc++。因此,请确保针对此自定义 STL 进行链接,以便成功编译。你可以看看这是如何在android运行时CMakeLists中实现的.txt
标签:std,__,undefined,NewDefaultPlatform,platform,v8,unique,reference 来源: https://www.cnblogs.com/marklove/p/16289643.html