[Lazarus] Troll Tech and Inprise/Borland Collaborate on LinuxGUI

Marc Weustink weus at quicknet.nl
Sat Apr 29 09:29:25 EDT 2000

At 18:30 28-04-2000 -0700, Curtis White wrote:
>So if I compile a .so file with gcc and then I compile a .so file with 
>FPC, do those two .so files work differently internally?  This is really 
>confusing to me because I had thought an executable was the same no matter 
>which compiler it was compiled with.  I always thought the compiler just 
>took the source code and made it into assembly and then the linker turned 
>it into binary code. I didn't know that the binary code was different 
>depending on which compiler you use. That is interesting.
>What about on Windows? Is an .exe or .dll file that is compiled with FPC
>different than an .exe or .dll file compiled with Borland C++ Builder or MS
>Visual C++ or Delphi?

Correct me if I'm wrong but I think using .so is similar to using .dll Both 
are binary libraries. I think a .so / .dll generated by fpc dousnt differ 
from one genrated by an other app.
Point here is the way these libs are called. If the lib contains flat 
functions you have a calling convention on how  the parameters are passed. 
To call gtk libs, we use the cdecl convention. If you want to use functions 
from a dll you use the stdcall convention.
For objects being passed between libs, you need more than a calling 
convention, you also need to support the same objectmodel. IE, how are 
methods called and how do I look them up in the VMT.
On the project I'm currently working on I use Interfaces to interface 
between the delphi objectrs and say for instance VC objects.


More information about the Lazarus mailing list