Can i using D & LLVM & SDL2 for Android?
Joakim via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Mar 14 08:38:22 PDT 2017
On Tuesday, 14 March 2017 at 01:57:56 UTC, rikki cattermole wrote:
> On 14/03/2017 6:08 AM, Joakim wrote:
>> On Monday, 13 March 2017 at 09:33:39 UTC, rikki cattermole
>> wrote:
>>> On 13/03/2017 7:48 PM, Joakim wrote:
>>>> [...]
>>>
>>> Why exactly doesn't the Android port support dlopen, dlsym
>>> and dlclose?
>>> It is provided by the NDK libc.
>>>
>>> At least according to this[0].
>>>
>>> [0] https://developer.android.com/ndk/guides/stable_apis.html
>>
>> I was more talking about D shared libraries, which I'm assuming
>> DerelictSDL2 qualifies as and would require Phobos built as a
>> shared
>> library. That hasn't been tried yet on Android.
>
> DerelictSDL2 would be statically linked, it would dynamically
> bind via dlopen, dlsym and dlclose to SDL itself which would be
> compiled as a shared library.
>
> This is how Derelict based libraries work.
Ah, I have either misunderstood or forgotten how Derelict works.
If the D code is all statically linked and only non-D, C/C++
shared libraries are loaded in addition to the single D shared
library, there should be no problem using all Derelict modules on
Android.
More information about the Digitalmars-d-learn
mailing list