<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Am Do., 31. Jan. 2019, 22:03 hat Marc Santhoff <<a href="mailto:M.Santhoff@web.de">M.Santhoff@web.de</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 2019-01-31 at 11:00 -0700, conlin664 via fpc-pascal wrote:<br>
> sven,<br>
><br>
> so I just tried, what I think you said:<br>
><br>
> procedure HelloC; cdecl; external name 'HelloC';<br>
><br>
> pcode.pas(19,1) Error: Undefined symbol: _HelloC<br>
><br>
><br>
> sorry for complaining about windows, but i feel like this is more difficult<br>
> on windows.<br>
> All of the FPC examples, seem to run without this extra '_' business and i<br>
> suspect they are on linux Os macOs.<br>
<br>
You could rename your "HelloC.o to "_HelloC.o" before archiving inte the<br>
library? Not that beautiful, but would be working, wouldn't it?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">That is the object file, not the symbol. The symbol is the important part here. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
@Sven:<br>
Maybe it is a later addition, but her on fpc 2.6.4 your syntax is not<br>
mentioned in the Programmers Guide (prog.pdf).<br>
<br>
If i did look carefully enough there is no description of the syntax for:<br>
<br>
"external name <NAME>"<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It's an old syntax. Probably it was simply forgotten to be added to the documentation. Happens... 🤷♀️</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And more, those details of naming and the different name conventions on Win32<br>
and Win64 are missing, too. I think there should be at least a wiki page or<br>
better some explanations in the Programmers Guide. </blockquote></div></div><div dir="auto"><br></div><div dir="auto">This is part of the platform's ABI. It's not our job to document that, only to make it usable. </div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Sven </div><div dir="auto"></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div>