Re: [android-building] Rtti, Exceptions, stlport, gnustl on AOSP

1,017 views
Skip to first unread message

Jean-Baptiste Queru

unread,
Nov 7, 2012, 10:23:39 AM11/7/12
to android-...@googlegroups.com
You can't use those in AOSP (because of GPL issues).

JBQ

On Wed, Nov 7, 2012 at 12:24 AM, Jānis Čoders <janis....@gmail.com> wrote:
> So, I've been struggling with this for a loooong time. I know how to
> configure and use these libraries in NDK case (haven't tried, but have been
> reading A LOT), because there are specific commands for that, which are not
> available in AOSP case.
> I would like to use typeid and dynamic_cast functionality, but can't get it
> working. In NDK documentation it is said that stlport supports RTTI, so it
> should be possible to use these types.
>
> Trying typeid, dynamic_cast:
>
> I've tried MANY Android.mk combinations on how to include libstlport and
> there are always different errors for different combinations.
> Examples of different errors:
> undefined reference to 'operator new(unsigned int, void*)'
> 'vtable for __cxxabiv1::__si_class_type_info'
> error: must #include <typeinfo> before using typeid (but I HAVE included
> it)!!!
>
> I can compile code with dynamic cast using this combination:
>
> LOCAL_C_INCLUDES := \
> bionic \
> external/stlport/stlport \
>
> LOCAL_SHARED_LIBRARIES := \
> libstlport \
> libgabi++
>
> But then I can't compile code using typeid. In typeid case I need to do it
> this way:
>
> LOCAL_C_INCLUDES += \
> abi/cpp/include \
> bionic \
> external/stlport/stlport \
>
> LOCAL_SHARED_LIBRARIES := \
> libstlport
>
> So the question is this:
> What is the RIGHT way to use libstlport in AOSP compilation and to be able
> to use RTTI extension (for dynamic_cast)? When should i include
> abi/cpp/include ? When should i use libgabi++?
>
> =======================================================
>
> And in case if I wanted to use full library with rtti and exceptions (i.e.
> to compile boost) how can I use gnustl?
> NDK can use gnustl library and it is available precompiled. HOW can I
> include it in AOSP project. I've tried copying to my folder and tried to
> include it many different ways, but there are always some kind of undefined
> references. Can someone give a working example?
>
> Thank you!!!!!
>
>
>
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en



--
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.
Reply all
Reply to author
Forward
0 new messages