[fpc-pascal] Re: calling object pascal object function in c/c++

Toan Pham tpham3783 at gmail.com
Mon Mar 28 17:01:56 CEST 2011


I just find out the solution.
To make sure that fpc does not change function names after compilation, one
has to add 'export' identifier to such functions.  This would be the
solution to the above example.


function test(): integer; stdcall; export;



I tested and it linked fine.  One can also use the alias identifier to be
able to have a new function name references FPC function.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110328/39cef9c0/attachment.html>


More information about the fpc-pascal mailing list