Library archives
Alastair Reid
reid at cs.utah.edu
Fri Jun 14 22:09:37 EDT 2002
The current spec contains no examples of how you would specify a
library archive. Which of the following are legal:
foreign import ccall "[Storable_cbits.o]" readCharOffPtr :: ...
foreign import ccall "[libc.so]" malloc :: ...
foreign import ccall "[libc.a]" malloc :: ...
foreign import ccall "[-lc]" malloc :: ...
foreign import ccall "[-L/usr/lib -lc]" malloc :: ...
I'm assuming that any relative filenames should be interpreted as being
relative to the directory containing the .hs file.
My current interpretation is that anything legal on a link line is ok
(so all the above are kosher) but it may be sensible to limit it to
just the first 3 forms.
I'd like the spec to say what's legal and give at least one example.
--
Alastair Reid reid at cs.utah.edu http://www.cs.utah.edu/~reid/
More information about the FFI
mailing list