[fpc-devel] New rules for External
rstar at mnet-online.de
rstar at mnet-online.de
Fri Nov 26 16:52:14 CET 2004
But e.g.
gcc -c -o test.ow test.c
produces identifiers *without* "_"-prefix
Peter Vreman wrote:
>>This is not Delphi compatible ...
>>
>>
>
>Ofcourse we check this before changing things like this. Delphi only
>accepts the next directive for importing from DLLs:
>
>external 'dllname' name 'functionname'
>
>
>FPC supports besides importing from DLLs also referencing other public
>accessible assembler symbols. These can come from sharedlibraries or from
>linked objects or even from routines in pascal that are declared public.
>
>external name 'functionname'
>external 'dllname'
>
>If no functionname is specified the following rules are used:
>- default is to use the name as written in the source
>- for cdecl declared procedures the name as written in the source
>prepended with _ (for most targets, some don't need the _ prefix)
>
>
>For referencing functions with external in your own program or exporting
>for referencing from other languages like C:
>
>public
>public name 'functionname'
>
>For the functionname the same rules as with external apply (as written in
>source and for cdecl prepended with a _)
>
>
>
>
>_______________________________________________
>fpc-devel maillist - fpc-devel at lists.freepascal.org
>http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
>
>
More information about the fpc-devel
mailing list