Linking a library assembly to ndk r10 in a project assembly using ndk r13 using C ++ _ shared stl

We have a prebuild library that was created using android ndk r10e. The project we are working on is being built using ndk r13b. When trying to link the library, our assembly will fail with undefined reference errors for all library functions containing ndk stl, provided classes, such as strings. Error:

Foo.cpp:39: undefined reference to `namespaceFoo::Bar::fooBar(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)' 

we fixed this problem with another library by simply building it using ndk 13. Unfortunately, for one of the required libraries, it is not under control.

We bind C ++ _ shared lib as stl.

Is there any way to make this work? Can we somehow properly associate the library assembly with ndk r10?

EDIT: it is clear that we are using C ++ _ shared stl. This is apparently the underlying problem.

+5
source share
1 answer

I know that it has been a long time since I asked this.

It turns out that Google did a lot of work on C ++ _ shared lib and NDK itself, which led to these incompatibilities. We have never encountered anything so critical with the later NDK again.

TL / DR: Yes, they are incompatible.

0
source

Source: https://habr.com/ru/post/1262930/


All Articles