<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 21, 2013 at 2:36 PM, Marco van de Voort <span dir="ltr"><<a href="mailto:marcov@stack.nl" target="_blank">marcov@stack.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">In our previous episode, Vittorio Giovara said:<br>
> > {$linklib gcc}<br>
> ><br>
> > What other libraries should I add? BTW, I'm compiling the C library with MinGW.<br>
><br>
> You need to instruct fpc to use gcc instead of default ld when you<br>
> link c/pas code statically.<br>
<br>
</div>Fpc can't call gcc.<br>
<div class="im"><br></div></blockquote><div>Well you could manually edit <a href="http://ppas.sh/link.res">ppas.sh/link.res</a> and substitute 'gcc' to 'ld', and of course adjust all the flags.<br></div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> This is because gcc adds many linker flags that are automatically set<br>
> when you link something but are not set when you call ld directly.<br>
<br>
</div>FPC can pass extra flags to the linker. Just harvest the flags by compiling<br>
a simple program with gcc<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote>Indeed, too bad sometimes you have to link gcc, sometimes gcc_s.1, sometimes stdc++ and so on, depending on target, architecture, operating system and so on...<br>
</div><div class="gmail_quote">Like I said other time, not really portable, but with little use-case too, so not a big deal, right?<br><br>Cheers,<br>Vittorio<br></div></div></div>