On Sun, Sep 11, 2011 at 10:56, Captain Freako <capn.fre...@gmail.com> wrote:

> I can understand why I'd have to explicitly link against `libHSrts',
> since I'm asking ghc for a shared object library and not an
> executable. However, I'm not sure about the following:
> - Why do I need to give the `-L/usr/lib/ghc-6.12.3/' option? (It seems
> like ghc ought to know about that, implicitly.)
> - Why do I need to explicitly link against the 3 standard C libraries:
> `m', `ffi', and `rt'? (I've never needed to do this, previously, when
> I was building/testing this project statically.)
>

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.

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.

-- 
brandon s allbery                                      allber...@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to