[Haskell-beginners] Compiling shared (dll) library
Alexander.Vladislav.Popov
alexander.vladislav.popov at gmail.com
Mon Dec 5 13:44:25 CET 2011
>
> The fundamental thing is that in --make mode, GHC figures out the required
> Haskell dependencies itself. So it sees the import and looks in which
> package it's provided and links (if necessary) with that package.
> But when you tell it to link a couple of .o files, it's not in --make mode,
> so apart from the specified files it links in only symbols from a few
> select packages (I think the wired-in packages), so then you have to tell
> it which other packages it needs to link in.
> $ ghc -shared -package regex-genex -o genexlib.dll genexlib.o
> genexlib_stub.o start.o
> should fix the undefined reference.
Aaaaaaaaaaa!
You are the Great Magician!
> compiling:
> > >ghc -c genexlib.hs
> > >ghc -c start.c
> > >ghc -shared -o genexlib.dll genexlib.o genexlib_stub.o start.o
> Why the separate compilation? Can't you compile them in one go?
Sorry for a stupid question, how is it?
And one more question, please: how I can export genexPure :: [String] ->
[String] to achieve all preferences of lazy list? Not all array at once,
but to get someting like an iterator, what I can call to get new genex.
--
Thanks a lot,
Alexander Popov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111205/7a25bb3e/attachment.htm>
More information about the Beginners
mailing list