[Interest] Using std::string in android projects
Jason H
jhihn at gmx.com
Mon Jan 4 23:11:09 CET 2016
> That's the std::terminate's default handler. That handler is called when an
> exception is thrown but not caught. What exception was thrown? Can you put a
> catch block to see what it was?
I tried that, but it is crashing in not-my-code. I wrapped the areas with try/catch where I use the std::string class. Nothing.
> > My .pro android block:
> > android {
> > QT += androidextras
> > LIBS +=
> > -L/Users/jhihn/Downloads/android-ndk-r10e/platforms/android-9/arch-arm/usr/
> > lib/ -lstlport_shared
>
> Why are you using stlport? Can't you use libstdc++ like everyone else does?
> For that matter, didn't I read a day or two ago that Android had switched the
> NDK to Clang/LLVM, so libc++ should be the one people would use?
>
> > LDLIBS += -l -lc -lm -ldl -lgcc
>
> This line does nothing.
>
> > ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
> > ANDROID_EXTRA_LIBS +=
> > /Users/jhihn/Downloads/android-ndk-r10e/sources/cxx-stl/stlport/libs/armeab
> > i-v7a/libstlport_shared.so }
Well there is a library that depends on the std::string class. I then use std::string to shuffle data into and out of the library, using QString/QByteArray as appropriate.
It seems I may need to pass RTLD_GLOBAL to the dlopen() call. i.e. dlopen("stlport_shared", RTLD_GLOBAL| RTLD_LAZY) But qt is only assigning RTLD_LAZY. How can I alter this flag?
More information about the Interest
mailing list