[fpc-pascal] Can Delphi load a small function of a shared lib written in Free Pascal 2.6.2?

silvioprog silvioprog at gmail.com
Thu Jan 16 18:31:00 CET 2014


Hello,

On Windows, I'm trying to serialize an object to JSON in Delphi 7, using
FPC functions linked in a shared lib.

I'm sendind a small demo in attached. To test it is very easy:

1. compile the libfpserializer.lpr file;
2. copy the generated lib to the demo/lazarus_ok folder;
3. copy the generated lib to the demo/delphi_bug folder;

Now, compile the Lazarus project in "lazarus_ok" folder, compile, run and
see that it works fine. Now, compile the Delphi project in "delphi_bug"
folder, compile, run and see a bizzare bug that kills the app.

So, in Delphi 7, its possible to consume a DLL written in Free Pascal?

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140116/97b822be/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libfpserializer.zip
Type: application/zip
Size: 4206 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140116/97b822be/attachment.zip>


More information about the fpc-pascal mailing list