On 03/20/2016 01:11 PM, fredvs wrote: >> Or simply dlerror() like in the other program, should work. > OK. here code + result of GetProcedureAddress(), maybe it could help for > future fixes in fpc: > > GetProcedureAddress(hn, pchar('mp4ff_open_read'); > writeln(dlerror()); > > ---> Result: > > "Invalid shared object handle 0x2fb2800" >
Alright, ignore my previous mail, I'm lagging behind it seems ;-) Could this be related to pointer trucation? The man page of dlopen tells us that the return value is a pointer (hence the return value of LoadLibrary has the same width). In your example you used an integer. Is sizeof(Integer) = sizeof(Pointer) of your system? If for example, you are missing the upper four bytes of the pointer, the above message makes sense. -- Ewald _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal