On So, 2016-03-20 at 09:47 -0700, fredvs wrote: > Re-hello. > > To resume. > > Here what is working perfectly for me: > > {$IF DEFINED(freebsd)} > ... > var > ap1 : pointer; > begin > ap1 := dlopen(Pchar(mp4ff), 1); > Pointer(mp4ff_open_read) := dlsym(ap1, pchar('mp4ff_open_read')); > ... > {$else} > ... > var > an1 : integer; > begin > an1 := DynLibs.SafeLoadLibrary(PChar(mp4ff)); > Pointer(mp4ff_open_read) := GetProcAddress(an1, > pchar('mp4ff_open_read')); > ... > {$endif}
That's totally OK, but the unit dynlibs is written for platform independence and I'd like to be able to use it on FreeBSD and at least Windows without having much $ifdefs and the like. Have fun, Marc -- Marc Santhoff <m.santh...@web.de> _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal