[odb-users] Problems in android platform using ODB

Boris Kolpackov boris at codesynthesis.com
Wed Apr 3 10:57:23 EDT 2013


Hi,

ykw2012 <ykwu2012 at 163.com> writes:

> Then I  build the odb-example(hello-world) using the libraries to
> see if I got the same error.I put the libraries into the android
> system(Path:/system/lib),and put the application(hello-world) into
> the /data/local/tmp. I run the example,and I get a segmetation fault.

My bet would be on the exception handling and RTTI support. Have you
made sure that all the ODB libraries and your application are build
with exception/RTTI enabled as well as the that was STL build with
these features is used?

I am not an Android expert so I am not 100% sure how to achieve this,
but CPLUSPLUS-SUPPORT.html file that comes with the NDK has some
information on this.

Also be careful with mixing shared/static libraries. If you built
the ODB libraries as shared, then you most likely also have to use
shared STL for exceptions to work. In fact, to minimize the number
of potential issues, I would suggest that you start with building
the ODB libraries as static (--disabled-shared configure option)
and link to static STL. Only once this works, I would try to use
shared libraries.


> I wonder whether android platform is supported and do you have ever 
> test odb on android platform?

We haven't tested it ourselves, however, from the documentation, NDK
appears to provide a fairly complete C++ environment (C++ exceptions
and RTTI support as well as STL compiled with this support). I think
it is just a matter of configuring and building everything correctly.

Also, if you manage to make it work (I would be happy to help in any
way I can), it would be greatly appreciated if you could shared the
steps and commands you used to build everything.

Boris



More information about the odb-users mailing list