[fpc-devel] Undefined symbol when building for Windows
Bart
bartjunk64 at gmail.com
Mon Feb 24 19:31:35 CET 2025
Hi,
I have a unit with these procedure definitions:
====
type
TCompareItemsFunc = function (p1, p2: Pointer): Integer; //should
return -1, 0, or +1 only
TExchangeItemsProc = procedure(p1, p2: Pointer);
procedure ArraySort(Left, Right: Pointer; ElemSize: SizeInt;
CompareItems: TCompareItemsFunc; ExchangeItems: TExchangeItemsProc;
Ascending: Boolean = True);
procedure ArraySort(Left, Right: Pointer; ElemSize: SizeInt;
CompareItems: TCompareItemsFunc; ExchangeBuf: Pointer; Ascending:
Boolean = True);
procedure ArraySort(Data: Pointer; Count: SizeInt; ElemSize: SizeInt;
CompareItems: TCompareItemsFunc; ExchangeItems: TExchangeItemsProc;
Ascending: Boolean=True); inline;
procedure ArraySort(Data: Pointer; Count: SizeInt; ElemSize: SizeInt;
CompareItems: TCompareItemsFunc; ExchangeBuf: Pointer; Ascending:
Boolean=True); inline;
====
This unit compiles without errors.
I can invoke any of the procedure ArraySort(Left, Right: Pointer; ..)
without problem.
However if I invoke any of the ArraySort(Data: Pointer; Count:
SizeInt; ...) I get:
Error: Undefined symbol: FSIARRAYSORT_::=::\_ARRAYSORT$crcC7971128
I'm using fpc 3.2.2 on Win10.
The error occurs both for 32 and 64 bit.
Is there something wrong with my (boilerplate) procedure definitions?
Or is this a compiler/linker bug of 3.2.2?
Fpc main (3.3.1-6095-gd0b4e8730a) will happily compiles my code
regardless of what procedure I invoke.
So I guess (hope) it's a fixed bug, but maybe I'm just lucky?
Bart
--
Bart
More information about the fpc-devel
mailing list