www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Could you anybody using DerelictSDL2 on Android?

reply zhani <dummy dummy.org> writes:
howdy :-)

can anybody use sdl2 on android?

first, i got a ldc2 for android. i just followed here on windows:
https://wiki.dlang.org/Build_D_for_Android#Windows

so i could compile a sieve.d but didnt run it on android yet.

then next? wut can i try for using DerelictSDL2 on android?
and this guide didn't use dub. how can i intergradted with ldc2 
for android?

pls be advised me.

regards,
Aug 07 2018
next sibling parent reply Mike Parker <aldacron gmail.com> writes:
On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote:
 howdy :-)

 can anybody use sdl2 on android?

 first, i got a ldc2 for android. i just followed here on 
 windows:
 https://wiki.dlang.org/Build_D_for_Android#Windows

 so i could compile a sieve.d but didnt run it on android yet.

 then next? wut can i try for using DerelictSDL2 on android?
 and this guide didn't use dub. how can i intergradted with ldc2 
 for android?

 pls be advised me.

 regards,
I don't do any sort of Android development, so I've never tested any Derelict packages on the platform. A few years back someone did some work with the DerelictGLES binding on Android and IIRC I made some updates to the DerelictUtil package for it. And I've added some version statements to DerelictSDL2 for the Android-specific parts of the C headers. Beyond that, I don't know of anyone who's done anything with it.
Aug 11 2018
parent reply zhani <dummy dummy.org> writes:
On Saturday, 11 August 2018 at 08:47:59 UTC, Mike Parker wrote:
 On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote:
 [...]
I don't do any sort of Android development, so I've never tested any Derelict packages on the platform. A few years back someone did some work with the DerelictGLES binding on Android and IIRC I made some updates to the DerelictUtil package for it. And I've added some version statements to DerelictSDL2 for the Android-specific parts of the C headers. Beyond that, I don't know of anyone who's done anything with it.
so sad...
Aug 11 2018
parent reply Mike Parker <aldacron gmail.com> writes:
On Saturday, 11 August 2018 at 14:36:59 UTC, zhani wrote:
 On Saturday, 11 August 2018 at 08:47:59 UTC, Mike Parker wrote:
 On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote:
 [...]
I don't do any sort of Android development, so I've never tested any Derelict packages on the platform. A few years back someone did some work with the DerelictGLES binding on Android and IIRC I made some updates to the DerelictUtil package for it. And I've added some version statements to DerelictSDL2 for the Android-specific parts of the C headers. Beyond that, I don't know of anyone who's done anything with it.
so sad...
There's nothing sad about it. There's only so much time in a day. I have no reason to do any Android development. Nor iPhone development. Nor countless other platforms. The static binding configuration (see the docs [1]) *should* work for Android and will save you the time of implementing the bindings yourself. If you can compile DerelictSDL2 for Android using the DerelictSDL2_Static version, then link it and SDL2 with your app, it should work. All I'm saying is I've never tried it and I know of no one who has. If it works for you, or you can get it working, then we can tell the next person who comes along that it does work. [1] http://derelictorg.github.io/packages/sdl2/
Aug 11 2018
parent zhani <dummy dummy.org> writes:
On Sunday, 12 August 2018 at 03:42:34 UTC, Mike Parker wrote:
 On Saturday, 11 August 2018 at 14:36:59 UTC, zhani wrote:
 On Saturday, 11 August 2018 at 08:47:59 UTC, Mike Parker wrote:
 On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote:
 [...]
I don't do any sort of Android development, so I've never tested any Derelict packages on the platform. A few years back someone did some work with the DerelictGLES binding on Android and IIRC I made some updates to the DerelictUtil package for it. And I've added some version statements to DerelictSDL2 for the Android-specific parts of the C headers. Beyond that, I don't know of anyone who's done anything with it.
so sad...
There's nothing sad about it. There's only so much time in a day. I have no reason to do any Android development. Nor iPhone development. Nor countless other platforms. The static binding configuration (see the docs [1]) *should* work for Android and will save you the time of implementing the bindings yourself. If you can compile DerelictSDL2 for Android using the DerelictSDL2_Static version, then link it and SDL2 with your app, it should work. All I'm saying is I've never tried it and I know of no one who has. If it works for you, or you can get it working, then we can tell the next person who comes along that it does work. [1] http://derelictorg.github.io/packages/sdl2/
I didnt say to “please, be make a android build now!” Yah, you’re right. You dont have to make a DerelictSDL2 for any platform. Im very sorry but i dont care about it. I just wanna know how to do it. Anything is ok for me. Links, advices with detail, experience. I wanna clue and its not a dev req to you. Ok, i got some clues in here. First, there is no people who tried it. Sad. Second, be use a SDL2 with static version. it will be working. but nobody unknow how to do it. And notice, A DerelictSDL2 IS NOT A REASON to development for any platform. RIGHT? It was i know, and what i know all. I just can, init a dub, replace a dmd to ldc2 for android, add a DerelictSDL2 and sit here in a corner, crying. Anyway thank you for reply to stupid question. :-) Regards,
Aug 12 2018
prev sibling parent reply tide <tide tide.tide> writes:
On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote:
 howdy :-)

 can anybody use sdl2 on android?

 first, i got a ldc2 for android. i just followed here on 
 windows:
 https://wiki.dlang.org/Build_D_for_Android#Windows

 so i could compile a sieve.d but didnt run it on android yet.

 then next? wut can i try for using DerelictSDL2 on android?
 and this guide didn't use dub. how can i intergradted with ldc2 
 for android?

 pls be advised me.

 regards,
You can use SDL2 for Android, you don't need DerelictSDL2 either. You just need a way to call the SDL2 functions, which you can do by creating bindings for them with "extern(C)". Which is my preference over Derelict, as it is simpler and makes things easier to use (for me). Otherwise you are probably going to run into a lot of issues as no one is really testing LDC2 for android. The people that are testing it aren't testing it the traditional way you build an app with the Android SDK.
Aug 11 2018
parent reply zhani <dummy dummy.org> writes:
On Saturday, 11 August 2018 at 14:03:21 UTC, tide wrote:
 On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote:
 howdy :-)

 can anybody use sdl2 on android?

 first, i got a ldc2 for android. i just followed here on 
 windows:
 https://wiki.dlang.org/Build_D_for_Android#Windows

 so i could compile a sieve.d but didnt run it on android yet.

 then next? wut can i try for using DerelictSDL2 on android?
 and this guide didn't use dub. how can i intergradted with 
 ldc2 for android?

 pls be advised me.

 regards,
You can use SDL2 for Android, you don't need DerelictSDL2 either. You just need a way to call the SDL2 functions, which you can do by creating bindings for them with "extern(C)". Which is my preference over Derelict, as it is simpler and makes things easier to use (for me). Otherwise you are probably going to run into a lot of issues as no one is really testing LDC2 for android. The people that are testing it aren't testing it the traditional way you build an app with the Android SDK.
Oh, could you tell me more about it? what's different about "extern(C)" and "DerelictSDL2"? i known, a DerelictSDL2 is a binding library for D and that's support "Dynamic" and "Static". need a help and more info! have you got some work(eg. source, project) about it? otherwise, can you tell me any link about it ?
Aug 11 2018
parent reply tide <tide tide.tide> writes:
On Saturday, 11 August 2018 at 14:44:49 UTC, zhani wrote:
 On Saturday, 11 August 2018 at 14:03:21 UTC, tide wrote:
 On Tuesday, 7 August 2018 at 12:05:33 UTC, zhani wrote:
 howdy :-)

 can anybody use sdl2 on android?

 first, i got a ldc2 for android. i just followed here on 
 windows:
 https://wiki.dlang.org/Build_D_for_Android#Windows

 so i could compile a sieve.d but didnt run it on android yet.

 then next? wut can i try for using DerelictSDL2 on android?
 and this guide didn't use dub. how can i intergradted with 
 ldc2 for android?

 pls be advised me.

 regards,
You can use SDL2 for Android, you don't need DerelictSDL2 either. You just need a way to call the SDL2 functions, which you can do by creating bindings for them with "extern(C)". Which is my preference over Derelict, as it is simpler and makes things easier to use (for me). Otherwise you are probably going to run into a lot of issues as no one is really testing LDC2 for android. The people that are testing it aren't testing it the traditional way you build an app with the Android SDK.
Oh, could you tell me more about it? what's different about "extern(C)" and "DerelictSDL2"? i known, a DerelictSDL2 is a binding library for D and that's support "Dynamic" and "Static". need a help and more info! have you got some work(eg. source, project) about it? otherwise, can you tell me any link about it ?
extern(C) is a feature, Derelict are libraries. https://dlang.org/spec/interfaceToC.html You can use Derelict "static" to the same effect I think, but they way they achieve it doesn't play well with auto completion and such.
Aug 11 2018
parent Mike Parker <aldacron gmail.com> writes:
On Saturday, 11 August 2018 at 15:46:47 UTC, tide wrote:

 extern(C) is a feature, Derelict are libraries.

 https://dlang.org/spec/interfaceToC.html

 You can use Derelict "static" to the same effect I think, but 
 they way they achieve it doesn't play well with auto completion 
 and such.
All of the Derelict declarations *are* extern(C). If you use the dynamic bindings, you won't get autocompletion because the declarations are function pointers. If you use the static binding option, you will get autocompletion the same as if you implemented it yourself.
Aug 11 2018