Re: Can i using D & LLVM & SDL2 for Android?
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.
Re: Can i using D & LLVM & SDL2 for Android?
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.
Re: Can i using D & LLVM & SDL2 for Android?
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.
Re: Can i using D & LLVM & SDL2 for 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 advices!! :-)
Re: Can i using D & LLVM & SDL2 for Android?
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
Re: Can i using D & LLVM & SDL2 for Android?
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.
Re: Can i using D & LLVM & SDL2 for Android?
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/hbumubsbrzffvgria...@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
Re: Can i using D & LLVM & SDL2 for Android?
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/hbumubsbrzffvgria...@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.
Re: Can i using D & LLVM & SDL2 for Android?
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/hbumubsbrzffvgria...@forum.dlang.org Ah, you're right. I will trying DerelictSDL2. Thx :-)
Re: Can i using D & LLVM & SDL2 for Android?
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.
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,