Java Question Native .so library for x86 and b4j

DonManfred

Expert
Licensed User
Longtime User
I am doing a wrapper which can be used in android (b4a library) and as there is a x86 native .so file available i thought it should work in b4j too.

The libtdjni.so is in the jar file unter {tdl4j.jar}\lib\x86

I get an error when running


Do i need to place them in another directory?
 

DonManfred

Expert
Licensed User
Longtime User
Try System.load(FileName)
That works. Great. But now i get the error

 

DonManfred

Expert
Licensed User
Longtime User
Just guessing, is it possible that your first assumption isn't correct, and the x86 lib is also for x86 Android?
That's a good point...

You mean it is possible that the .so is for x86 Android (and not for windows x86 as i initially thought)? I did not know that a x86 Android exists at all.
Ok then. I can probably run it on an android emulator on my PC?

So for windows i need to compile it by myself to get a dll which i could use in B4J?
 

JordiCP

Expert
Licensed User
Longtime User
You mean it is possible that the .so is for x86 Android (and not for windows x86 as i initially thought)? I did not know that a x86 Android exists at all.
Ok then. I can probably run it on an android emulator on my PC?
That's what I thought and made some sense to me, but not sure. Also, if you look at the source code files, there is a suspicious import "android.logs...." so it makes even a bit more of sense.

So for windows i need to compile it by myself to get a dll which i could use in B4J?
I think so (if the above is true)
 

DonManfred

Expert
Licensed User
Longtime User
Ohh, ok. Then the lib does work only on Android (for now).

I´ll ask someone to help compiling it maybe to a windows dll.

Based on the comment on Telegram website it should be possible (at least i think so).

https://telegram.org/blog/tdlib

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…