[odb-users] ODB on Android
c.sell at byterefinery.de
c.sell at byterefinery.de
Tue Apr 14 08:56:59 EDT 2020
Hi,
IMO and according to my experience, the ODB compiler has no dependency
on the target system, including the c/c++ libraries. After all, it is
just a code generator. As long as it generates valid standard C++
code, it should work on any system.
I have compiled on ealier NDKs without issues.
Chris
Zitat von Wolfgang Haupt <haupt.wolfgang at gmail.com>:
> On 14.04.20 12:02, Boris Kolpackov wrote:
>> Wolfgang Haupt <haupt.wolfgang at gmail.com> writes:
>>
>>> And I can cross-compile libodb and libodb-sqlite+libodb-mysql just fine.
>>>
>>> However I struggle to see how this will work together with the odb
>>> compiler.
>> You would normally use native ODB compiler for your development machine.
>> So if you are using x86-64 Linux to develop for ARM Android, then you
>> would run x86-64 Linux ODB compiler, generate the database support
>> source code (the source code is the same for all the platforms), then
>> compile that for ARM Android along with your other source code, and
>> finally link everything together with cross-compiled libodb*.
>>
>> It may be possible to build a native ODB compiler for Android but we
>> haven't tried (you will most likely need to build GCC from scratch
>> with plugin support).
>
> Hey Boris,
>
> thx for your clarification - seems the procedure works better when I
> use version 17 of the
> android ndk.
> I'm still in the compilation process, so I can probably report back
> once it is finished.
>
> Given the earlier mentioned errors just disappear when using the 17
> NDK, I wonder how/if it is possible
> for the odb compiler (on the host machine) to generate valid c++
> code for the target, when the target probably
> uses a completely different standard c/c++ library and has no
> support for GCC at all.
>
>> It may be possible to build a native ODB compiler for Android but we
>> haven't tried (you will most likely need to build GCC from scratch
>> with plugin support).
> I do not want to go this way either if not possbile, sounds like pain to me.
> Does that mean you have tried to use odb on a recent android ndk >= 18?
>
>
> Best Regards,
> Wolfgang
More information about the odb-users
mailing list