On So, 2016-03-20 at 14:27 +0100, Ewald wrote:

> 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.

Good point:

marc@puma:/home/marc/program/Test_fpc/LoadLibrary > uname -mrs
FreeBSD 9.1-STABLE amd64

marc@puma:/home/marc/program/Test_fpc/LoadLibrary > ./pointersize
pointersize:     8
size of integer: 2

marc@puma:/home/marc/program/Test_fpc/LoadLibrary > cat pointersize.pas 
program pointersize;
uses
  sysutils;
begin
  writeln('pointersize:     ' + inttostr(sizeof(pointer)));
  writeln('size of integer: ' + inttostr(sizeof(integer)));
end.

-- 
Marc Santhoff <m.santh...@web.de>

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to