www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Can I use Dlang in Qt5 instead C++ for develop Android Apps?

reply Baby Beaker <thegrapevine email.com> writes:
I want develop Android apps using Qt5. But C++ is very hard. I 
want to use Dlang becouse Dlang is very easy.
Apr 13 2020
parent reply evilrat <evilrat666 gmail.com> writes:
On Monday, 13 April 2020 at 21:01:50 UTC, Baby Beaker wrote:
 I want develop Android apps using Qt5. But C++ is very hard. I 
 want to use Dlang becouse Dlang is very easy.
In theory nothing stops you from doing that. In practice however you have to deal with C++ anyway, how API matches ABI, and many more low level underlying things. You also need to know how your OS works. Don't forget that you have to know the tools as well, dealing with Android means you will have to do cross-compilation. Must know how to use compilers, linkers and debuggers, and shell scripts as well as bonus. Oh and don't forget that you have to make bindings to interface these 2 domains, and that requires knowledge of both D and C++. So if you're too brave yet go ahead and try. There was some Qt attempts such as this one https://code.dlang.org/packages/qte5 But since the last release was in 2016 it is probably no longer compiles, and I have no idea if it supports Android.
Apr 13 2020
parent reply Basile B. <b2.temp gmx.com> writes:
On Tuesday, 14 April 2020 at 01:50:22 UTC, evilrat wrote:
 On Monday, 13 April 2020 at 21:01:50 UTC, Baby Beaker wrote:
 I want develop Android apps using Qt5. But C++ is very hard. I 
 want to use Dlang becouse Dlang is very easy.
In theory nothing stops you from doing that. In practice however you have to deal with C++ anyway, how API matches ABI, and many more low level underlying things. You also need to know how your OS works. Don't forget that you have to know the tools as well, dealing with Android means you will have to do cross-compilation. Must know how to use compilers, linkers and debuggers, and shell scripts as well as bonus. Oh and don't forget that you have to make bindings to interface these 2 domains, and that requires knowledge of both D and C++. So if you're too brave yet go ahead and try. There was some Qt attempts such as this one https://code.dlang.org/packages/qte5 But since the last release was in 2016 it is probably no longer compiles, and I have no idea if it supports Android.
I agree. I think ABI compliance is an easy step but one will have to take care to memory managment, that's the big thing OMO, i.e "this thing is allocated in C++ so it must not me mutated by D" or "this thing is allocated by D so it must not be mutated by C++".
Apr 14 2020
parent Basile B. <b2.temp gmx.com> writes:
On Tuesday, 14 April 2020 at 09:27:35 UTC, Basile B. wrote:
 On Tuesday, 14 April 2020 at 01:50:22 UTC, evilrat wrote:
 On Monday, 13 April 2020 at 21:01:50 UTC, Baby Beaker wrote:
 I want develop Android apps using Qt5. But C++ is very hard. 
 I want to use Dlang becouse Dlang is very easy.
In theory nothing stops you from doing that. In practice however you have to deal with C++ anyway, how API matches ABI, and many more low level underlying things. You also need to know how your OS works. Don't forget that you have to know the tools as well, dealing with Android means you will have to do cross-compilation. Must know how to use compilers, linkers and debuggers, and shell scripts as well as bonus. Oh and don't forget that you have to make bindings to interface these 2 domains, and that requires knowledge of both D and C++. So if you're too brave yet go ahead and try. There was some Qt attempts such as this one https://code.dlang.org/packages/qte5 But since the last release was in 2016 it is probably no longer compiles, and I have no idea if it supports Android.
I agree. I think ABI compliance is an easy step but one will have to take care to memory managment, that's the big thing OMO,
IMO ʕ •`ᴥ•´ʔ
Apr 14 2020