<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014/1/16 Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>
On Thu, 16 Jan 2014, silvioprog wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello,<br>
On Windows, I'm trying to serialize an object to JSON in Delphi 7, using FPC functions linked in a shared lib.<br>
<br>
I'm sendind a small demo in attached. To test it is very easy:<br>
<br>
1. compile the libfpserializer.lpr file;<br>
2. copy the generated lib to the demo/lazarus_ok folder;<br>
3. copy the generated lib to the demo/delphi_bug folder;<br>
<br>
Now, compile the Lazarus project in "lazarus_ok" folder, compile, run and see that it works fine. Now, compile the<br>
Delphi project in "delphi_bug" folder, compile, run and see a bizzare bug that kills the app.<br>
<br>
So, in Delphi 7, its possible to consume a DLL written in Free Pascal?<br>
</blockquote>
<br></div>
You cannot mix Delphi objects with FPC objects.<br>
<br>
They have a different memory layout, the RTTI is different etc.<br>
So what you try to do is not possible.<span><font color="#888888"><br>
<br>
Michael.</font></span></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">:(</div><div class="gmail_extra"><br></div><div class="gmail_extra">I think I saw a good news in the following e-mail, I will reply there ...<br>
</div><div class="gmail_extra"><br></div>--<br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>