creating a library from haskell files and a c wrapper in Linux

Seth Kurtzberg seth@cql.com
Tue, 10 Sep 2002 09:04:54 -0700


Doesn't work, as in won't compile, or doesn't work as in it compiles and links 
but won't run?

On Tuesday 10 September 2002 09:11, Simon Marlow wrote:
> > Speaking solely from the gcc side, if you can capture all the
> > compilation
> > commands, add "-PIC", and then grab the ld flags and change
> > the options
> > there, everything should work.  This is, obviously, not
> > terribly convenient
> > but anything that links as a binary should work as a shared
> > library as well.
> > Simon, am I missing something?
>
> Yes :-)  -fPIC doesn't work for the code generated by GHC.    You can make
> shared libraries without -fPIC, but that also imposes constraints on the
> code, constraints which the code generated by GHC doesn't satisfy at the
> moment.  I can't remember the exact details, but John Levine's Linker book
> is a good place to start.
>
> Cheers,
> 	Simon
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

-- 
-----------------------------------
Seth Kurtzberg
M. I. S. Corp.
1-480-661-1849