[Haskell-cafe] How to get Cabal to spit out a .a library suitable for linking into C/Objective-C
feeder.of.the.bears at gmail.com
Fri Jan 20 23:32:25 CET 2012
On Mon, Dec 26, 2011 at 4:40 PM, Donn Cave <donn at avvanta.com> wrote:
> Sorry about the belated response, but this shouldn't be a problem since
> it isn't going to be very helpful anyway!
> I've managed to follow the process described on this page:
> to link Haskell code to a non-Haskell main program, via Xcode.
> You've probably already seen this, it's mostly about a few iterations
> of trial and error linking, to get the list of GHC library dependencies,
> which is what you need whether you're using Xcode or not. If you really
> need a single library with your code and all those dependencies, that
> may be technically feasible, though awfully tedious.
Thanks for the pointer. I had already read this. I am looking for a
non-trial-and-error mechanism for creating a statically linked .a file.
It's Step 8 in the article.
Thanks for your help.
> The only clear problem I encountered while experimenting with it is that
> GHC run time options need ghc -rtsopts, so they're unavailable if your
> program isn't built by ghc. I believe I worked around that with a special
> rtsmain.o, could probably recover the details if that's of interest.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Visi.Pro, Cloud Computing for the Rest of Us http://visi.pro
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe