Hi,
I run a program on Windows using DLL, but when I compile it to Android, it doesn't run on Android, what should I do?
Regards
How to use the program including DLL on Android?
Moderator: Moderators
-
- Posts: 3
- Joined: Tue Nov 07, 2023 4:40 pm
Re: How to use the program including DLL on Android?
Hi,
Which Windows DLL are you using? You should check whether the library also has a Android version.
K
A DLL file is very similar to a EXE file and is therefore platform-specific and will only work on Windows. Android has a similar shared library concept though, using the SO extension instead.farhad abedini wrote: ↑Sun Nov 19, 2023 5:43 pmI run a program on Windows using DLL, but when I compile it to Android, it doesn't run on Android, what should I do?
Which Windows DLL are you using? You should check whether the library also has a Android version.
K
Re: How to use the program including DLL on Android?
You will need to edit the ZExternalLibrary BeforeInitExp in your project to handle your libraries without the need to have one project per machine.
For example:
And I recommend you to place your .so library in the folder:
ZGameEditor\Android\Template\4.1\libs\armeabi
Otherwise, they could get deleted in your exported Android folder.
For example:
Code: Select all
if(ANDROID)
{
this.ModuleName = "./libZgeBullet.so";
}
else if(LINUX)
{
this.ModuleName = "./ZgeBullet.so";
}
else
{
this.ModuleName = "ZgeBullet_x64";
}
ZGameEditor\Android\Template\4.1\libs\armeabi
Otherwise, they could get deleted in your exported Android folder.