Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 07, 2017 Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Just thought. I do want to know. :-) As far as I know is, * LDC2 woring on NDK(yah!) * Native OpenGLES: http://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D * Dlangui working on Android that based on SDL2: https://github.com/buggins/dlangui / https://dlang.org/blog/2016/10/07/project-highlight-dlangui/ regards, |
March 08, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to dummy | On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote:
> Just thought. I do want to know. :-)
>
> As far as I know is,
> * LDC2 woring on NDK(yah!)
> * Native OpenGLES: http://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D
> * Dlangui working on Android that based on SDL2: https://github.com/buggins/dlangui / https://dlang.org/blog/2016/10/07/project-highlight-dlangui/
>
> regards,
Yes, though I have not tried SDL2 myself.
|
March 09, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | On Wednesday, 8 March 2017 at 10:24:24 UTC, Joakim wrote: > On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote: >> Just thought. I do want to know. :-) >> >> As far as I know is, >> * LDC2 woring on NDK(yah!) >> * Native OpenGLES: http://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D >> * Dlangui working on Android that based on SDL2: https://github.com/buggins/dlangui / https://dlang.org/blog/2016/10/07/project-highlight-dlangui/ >> >> regards, > > Yes, though I have not tried SDL2 myself. https://forum.dlang.org/post/hbumubsbrzffvgriaodw@forum.dlang.org Ah, you're right. I will trying DerelictSDL2. Thx :-) |
March 13, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to dummy | On Thursday, 9 March 2017 at 10:35:18 UTC, dummy wrote: > On Wednesday, 8 March 2017 at 10:24:24 UTC, Joakim wrote: >> On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote: >>> Just thought. I do want to know. :-) >>> >>> As far as I know is, >>> * LDC2 woring on NDK(yah!) >>> * Native OpenGLES: http://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D >>> * Dlangui working on Android that based on SDL2: https://github.com/buggins/dlangui / https://dlang.org/blog/2016/10/07/project-highlight-dlangui/ >>> >>> regards, >> >> Yes, though I have not tried SDL2 myself. > > https://forum.dlang.org/post/hbumubsbrzffvgriaodw@forum.dlang.org > > Ah, you're right. > I will trying DerelictSDL2. > > Thx :-) Regarding the link to that forum post, that bug has since been found and fixed. If you're planning on using Derelict, there is an issue where all Derelict libraries are loaded as shared libraries, whereas the Android port currently doesn't support loading shared libraries. If DLangUI is using SDL2, maybe he has a header file that allows him to statically link against SDL2, which you could reuse. Otherwise, you may need to generate one using DStep: https://github.com/jacob-carlborg/dstep or modify the DerelictSDL2 files to allow you to link statically. |
March 13, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | On 13/03/2017 7:48 PM, Joakim wrote: > On Thursday, 9 March 2017 at 10:35:18 UTC, dummy wrote: >> On Wednesday, 8 March 2017 at 10:24:24 UTC, Joakim wrote: >>> On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote: >>>> Just thought. I do want to know. :-) >>>> >>>> As far as I know is, >>>> * LDC2 woring on NDK(yah!) >>>> * Native OpenGLES: >>>> http://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D >>>> >>>> * Dlangui working on Android that based on SDL2: >>>> https://github.com/buggins/dlangui / >>>> https://dlang.org/blog/2016/10/07/project-highlight-dlangui/ >>>> >>>> regards, >>> >>> Yes, though I have not tried SDL2 myself. >> >> https://forum.dlang.org/post/hbumubsbrzffvgriaodw@forum.dlang.org >> >> Ah, you're right. >> I will trying DerelictSDL2. >> >> Thx :-) > > Regarding the link to that forum post, that bug has since been found and > fixed. > > If you're planning on using Derelict, there is an issue where all > Derelict libraries are loaded as shared libraries, whereas the Android > port currently doesn't support loading shared libraries. If DLangUI is > using SDL2, maybe he has a header file that allows him to statically > link against SDL2, which you could reuse. > > Otherwise, you may need to generate one using DStep: > > https://github.com/jacob-carlborg/dstep > > or modify the DerelictSDL2 files to allow you to link statically. 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 |
March 13, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | On Monday, 13 March 2017 at 06:48:01 UTC, Joakim wrote: > If you're planning on using Derelict, there is an issue where all Derelict libraries are loaded as shared libraries, whereas the Android port currently doesn't support loading shared libraries. If DLangUI is using SDL2, maybe he has a header file that allows him to statically link against SDL2, which you could reuse. > > Otherwise, you may need to generate one using DStep: > > https://github.com/jacob-carlborg/dstep > > or modify the DerelictSDL2 files to allow you to link statically. The alpha release of DerelictSDL2 3.0 supports static linking. When compiling manually, it requires -version=DerelictSDL_static on the command line and all files matching "derelict/sdl2/internal/*_dyn*.d" should be excluded from the build. When building DerelictSDL2 with DUB, specifying -cderelict-sdl2-static gets the job done, or the same can be added as a subConfiguration value in a project's dub.json/sdl file. |
March 13, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | On Monday, 13 March 2017 at 06:48:01 UTC, Joakim wrote:
> On Thursday, 9 March 2017 at 10:35:18 UTC, dummy wrote:
>> [...]
>
> Regarding the link to that forum post, that bug has since been found and fixed.
>
> If you're planning on using Derelict, there is an issue where all Derelict libraries are loaded as shared libraries, whereas the Android port currently doesn't support loading shared libraries. If DLangUI is using SDL2, maybe he has a header file that allows him to statically link against SDL2, which you could reuse.
>
> Otherwise, you may need to generate one using DStep:
>
> https://github.com/jacob-carlborg/dstep
>
> or modify the DerelictSDL2 files to allow you to link statically.
thx! i will try it. :-D
|
March 13, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Monday, 13 March 2017 at 10:11:35 UTC, Mike Parker wrote:
> On Monday, 13 March 2017 at 06:48:01 UTC, Joakim wrote:
>
>> [...]
>
> The alpha release of DerelictSDL2 3.0 supports static linking.
>
> When compiling manually, it requires -version=DerelictSDL_static on the command line and all files matching "derelict/sdl2/internal/*_dyn*.d" should be excluded from the build.
>
> When building DerelictSDL2 with DUB, specifying -cderelict-sdl2-static gets the job done, or the same can be added as a subConfiguration value in a project's dub.json/sdl file.
thanks for advices!! :-)
|
March 13, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | 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. On Monday, 13 March 2017 at 10:11:35 UTC, Mike Parker wrote: > On Monday, 13 March 2017 at 06:48:01 UTC, Joakim wrote: > >> [...] > > The alpha release of DerelictSDL2 3.0 supports static linking. > > When compiling manually, it requires -version=DerelictSDL_static on the command line and all files matching "derelict/sdl2/internal/*_dyn*.d" should be excluded from the build. > > When building DerelictSDL2 with DUB, specifying -cderelict-sdl2-static gets the job done, or the same can be added as a subConfiguration value in a project's dub.json/sdl file. Thanks for the update, didn't know that. |
March 14, 2017 Re: Can i using D & LLVM & SDL2 for Android? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | 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.
|
Copyright © 1999-2021 by the D Language Foundation