[Haskell-cafe] How to get Cabal to spit out a .a library suitable for linking into C/Objective-C

David Pollak 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:
> http://www.haskell.org/haskellwiki/Using_Haskell_in_an_Xcode_Cocoa_project
> 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.

David


>
> 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.
>
>        Donn
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
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
Blog: http://goodstuff.im
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120120/74f4ca9a/attachment.htm>


More information about the Haskell-Cafe mailing list