[fpc-pascal] linking and using dynamic libraries on amd64

Marc Santhoff M.Santhoff at web.de
Sat Feb 14 06:21:10 CET 2015

On Fr, 2015-02-13 at 09:07 +0000, Tony Whyman wrote:
> A pity, because that would have been an easy fix. This type of error
> comes from either mis-matched calling conventions or incompatible
> argument lists.

No easy solution in sight...

> >From having done this sort of thing before all I can advise is to go
> through each function argument one by one and make sure that each
> argument type is exactly the same in terms of data representation. When
> going between 32 and 64 bit you can often find that there are subtle
> differences in how the different compilers treat types resulting in a
> type that might be compatible in the 32 bit world, ceasing to be
> compatible in the 64bit world.

I already started checking type sizes, but looking at the code is very
tough because of heavy use of macros.

Hopefully I can tweak those autoxxx-stuff into building a debug version
of the library. That should help in getting to know what exactly happens

If that fails it'll be the time to polish some preprocessor tricks.

> Also: you are using a 'C' library and not a C++ library aren't you?


Thanks so far.

Marc Santhoff <M.Santhoff at web.de>

More information about the fpc-pascal mailing list