<br>Hi,<br><br>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:<br><br><unit name>_<function name>$$<return type><br>
<br><br>for example, if i have this unit:<br><br><br>unit wrapper;<br><br>interface<br><br>function test(): integer; stdcall;<br><br>implementation<br><br>function test(); integer; stdcall;<br>begin<br> result := 3;<br>
end;<br><br>end.<br><br><br>when the unit described above is compiled, its name changed to "WRAPPER_TEST$$SMALLINT",<br>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? <br>
<br>Please help. <br><br><br>thank you.<br><br>Toan<br><br><br><br><br>