digitalmars.D.learn - Can i using D & LLVM & SDL2 for Android?
- dummy (9/9) Mar 07 2017 Just thought. I do want to know. :-)
- Joakim (2/11) Mar 08 2017 Yes, though I have not tried SDL2 myself.
- dummy (5/18) Mar 09 2017 https://forum.dlang.org/post/hbumubsbrzffvgriaodw@forum.dlang.org
- Joakim (11/30) Mar 12 2017 Regarding the link to that forum post, that bug has since been
- rikki cattermole (5/39) Mar 13 2017 Why exactly doesn't the Android port support dlopen, dlsym and dlclose?
- Joakim (6/24) Mar 13 2017 I was more talking about D shared libraries, which I'm assuming
- rikki cattermole (5/18) Mar 13 2017 DerelictSDL2 would be statically linked, it would dynamically bind via
- Joakim (6/28) Mar 14 2017 Ah, I have either misunderstood or forgotten how Derelict works.
- Mike Parker (10/20) Mar 13 2017 The alpha release of DerelictSDL2 3.0 supports static linking.
- dummy (2/13) Mar 13 2017 thanks for advices!! :-)
- dummy (2/16) Mar 13 2017 thx! i will try it. :-D
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,
Mar 07 2017
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.
Mar 08 2017
On Wednesday, 8 March 2017 at 10:24:24 UTC, Joakim wrote:On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote:https://forum.dlang.org/post/hbumubsbrzffvgriaodw forum.dlang.org Ah, you're right. I will trying DerelictSDL2. Thx :-)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.
Mar 09 2017
On Thursday, 9 March 2017 at 10:35:18 UTC, dummy wrote:On Wednesday, 8 March 2017 at 10:24:24 UTC, Joakim 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.On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote:https://forum.dlang.org/post/hbumubsbrzffvgriaodw forum.dlang.org Ah, you're right. I will trying DerelictSDL2. Thx :-)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.
Mar 12 2017
On 13/03/2017 7:48 PM, Joakim wrote:On Thursday, 9 March 2017 at 10:35:18 UTC, dummy 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.htmlOn Wednesday, 8 March 2017 at 10:24:24 UTC, Joakim 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.On Tuesday, 7 March 2017 at 12:06:48 UTC, dummy wrote:https://forum.dlang.org/post/hbumubsbrzffvgriaodw forum.dlang.org Ah, you're right. I will trying DerelictSDL2. Thx :-)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.
Mar 13 2017
On Monday, 13 March 2017 at 09:33:39 UTC, rikki cattermole wrote:On 13/03/2017 7:48 PM, Joakim wrote: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:[...]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.htmlOn Monday, 13 March 2017 at 06:48:01 UTC, Joakim wrote:Thanks for the update, didn't know that.[...]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.
Mar 13 2017
On 14/03/2017 6:08 AM, Joakim wrote:On Monday, 13 March 2017 at 09:33:39 UTC, rikki cattermole wrote: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.On 13/03/2017 7:48 PM, Joakim wrote: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.[...]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
Mar 13 2017
On Tuesday, 14 March 2017 at 01:57:56 UTC, rikki cattermole wrote:On 14/03/2017 6:08 AM, Joakim wrote: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.On Monday, 13 March 2017 at 09:33:39 UTC, rikki cattermole wrote: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.On 13/03/2017 7:48 PM, Joakim wrote: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.[...]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
Mar 14 2017
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.
Mar 13 2017
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:thanks for advices!! :-)[...]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.
Mar 13 2017
On Monday, 13 March 2017 at 06:48:01 UTC, Joakim wrote:On Thursday, 9 March 2017 at 10:35:18 UTC, dummy wrote:thx! i will try it. :-D[...]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.
Mar 13 2017