Hi,
I am working on calling object pascal functions from c/c++. I notice that when a unit is compiled into object code, the name of a function is altered in this convention:
<unit name>_<function name>$$<return type>
for example, if i have this unit:
unit wrapper;
interface
function test(): integer; stdcall;
implementation
function test(); integer; stdcall;
begin
result := 3;
end;
end.when the unit described above is compiled, its name changed to "WRAPPER_TEST$$SMALLINT",
not just test like c/c++ expects at link time. Is there a way perhaps through fpc compiler setting or using object pascal identifier to avoid object pascal name mangling like this?
Please help.
thank you.
Toan
