I use Crystax NDK and I have 2 make files that produce a static library (libA.a) and a shared library (libB.so). Module B is dependent on module A (which is reflected by LOCAL_STATIC_LIBRARIES in B's make file).
In module A's code I have a call to swscanf and it always returns -1.
I have found weird workaround for this problem:
if I add a call to swscanf somewhere in my module B's code, then swscanf starts to work fine everywhere - in module B and in module A (even though I have not changed module A's code).
My best guess is that it is a problem with linking: if I do not have wide character function invocation at the top level shared library, then linker uses default Google NDK's implementation of the function.
Please advice.
Asked
Active
Viewed 385 times
0

Tim
- 51
- 7
-
Could you please publish `Android.mk` for both libraries. You can also try to run `ndk-build` with `V=1` parameter, and you will see what link command parameters are actually used in your build. – Alex Cohn Oct 11 '12 at 14:24
-
I have simplified my make files structure for clarity, indeed I have 10 make files or so. I cannot publish them because of NDA that I have signed. Thank you for your suggestion about "V=1", I will try that. – Tim Oct 12 '12 at 14:38