[Haskell-cafe] Calling Haskell from C, Linking with gcc?
greg at gregorycollins.net
Tue Oct 6 15:07:01 EDT 2009
John Velman <velman at cox.net> writes:
> On Tue, Oct 06, 2009 at 09:48:44AM -0700, Thomas DuBuisson wrote:
> Thanks, Thomas.
> Linking in only libffi.a, libgmp.a, I get (for example, there are many
> more) missing:
> by also linking in libHSrts.a, I no longer am missing _newCAF, (and others
> that were missing without it) but am missing a lot of _base_GHCzi...
> references. I've been unable to track these down.
> By the way, I can't find either a libc.a or libm.a on this machine using
> either locate or spotlight.
> Is there a way to "guess" which library things are in, short of doing
> an nm with some appropriate option on each .a file in the Haskell lib?
$ cd /Library/Frameworks/GHC.framework/Versions/Current/usr/lib/
$ for i in `find . -name '*.a'`; do nm -a $i 2>/dev/null | grep --label="$i" -H 'D *_base_GHCziBase_plusInt_closure'; done
./ghc-6.10.4/base-220.127.116.11/libHSbase-18.104.22.168.a:0000008c D _base_GHCziBase_plusInt_closure
./ghc-6.10.4/base-22.214.171.124/libHSbase-126.96.36.199_p.a:0000010c D _base_GHCziBase_plusInt_closure
Gregory Collins <greg at gregorycollins.net>
More information about the Haskell-Cafe