[fpc-pascal] FPCJVM Android and libbass.so calling issue

Jonas Maebe jonas at freepascal.org
Wed Apr 17 20:19:25 CEST 2019

On 17/04/2019 20:11, Mgr. Janusz Chmiel wrote:
> I have decided to join my second question to this thread, because it is 
> also related to problem with libbass.so
> PPCJVM have problem to compile The following line of code from bass.pas 
> Delphi unit and also from newest bass.pas which is The part of bass zip 
> archive for Windows.
>    STREAMPROC_PUSH = Pointer(-1);   // push stream
> Is it possible to construct this short code so it will have The same 
> purpose and will be compatible with JVMAndroid compilation mode?

Calling native code from Java needs to happen through JNI (Java Native 
Interface). I have no experience with it, but it will never be possible 
to just take an existing Pascal interface to a library and compile that 
for the JVM target. Even if it would compile, the result could never work.

Additionally, JLSystem.loadLibrary expects the library name without the 
'.so' extension.


More information about the fpc-pascal mailing list