[fpc-devel] external problem

Peter Vreman peter at freepascal.org
Fri Nov 26 07:29:31 CET 2004


> interface
>
> procedure dfCrap(setoperation: Tso); cdecl;
>
> implementation
>
> {$LINK dfc.ow}   //GCC object file style
>
> procedure dfCrap(setoperation: Tso); cdecl; external;
> ...
>
>
> The declaration does exist in the interface!
> BTW: I am working under Win32.

You aren't importing from a DLL, so Win32 has the same rules.

The problem is that the interface declaration sets the assembler name to
something like U_UNITNAME_DFCRAP$TSO. The implementation declaration
changes the assembler name to _dfCrap. This gives problems when the
procedure was already called (from other units) before the implementation
declaration is parsed.







More information about the fpc-devel mailing list