<div dir="ltr">On Sun, Sep 11, 2011 at 10:56, Captain Freako <span dir="ltr"><<a href="mailto:capn.freako@gmail.com">capn.freako@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I can understand why I'd have to explicitly link against `libHSrts',<br>
since I'm asking ghc for a shared object library and not an<br>
executable. However, I'm not sure about the following:<br>
- Why do I need to give the `-L/usr/lib/ghc-6.12.3/' option? (It seems<br>
like ghc ought to know about that, implicitly.)<br>
- Why do I need to explicitly link against the 3 standard C libraries:<br>
`m', `ffi', and `rt'? (I've never needed to do this, previously, when<br>
I was building/testing this project statically.)<br></blockquote><div><br></div><div>The first is because GHC doesn't link its libraries using -L and basenames, but full path names. Since you used a basename, you also have to use -L to tell it how to expand the basename.</div>
<div><br></div><div>The second is because those libraries are needed by libHSrts, and since you linked that explicitly you need to link its dependencies explicitly as well.</div><div><br></div></div>-- <br>brandon s allbery <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>
wandering unix systems administrator (available) (412) 475-9364 vm/sms<br><br>
</div>