
7 Sep
2001
7 Sep
'01
9:55 a.m.
How can I configure a ghc package for use with ghci? what file does the linker try to load, and what is expected as contents?
For a Haskell library, the linker will attempt to load <lib>.o, where the batch compiler would normally look for lib<lib>.a (on Unix). You can construct <lib>.o from its constituent .o files using 'ld -r': ld -r -o <lib>.o Foo.o Bar.o or you can construct it from the .a library, like so: ld -r -o <lib>.o --whole-archive lib<lib>.a
is it libHSmypackage.so? do I have to set LD_LIBRARY_PATH manually?
For normal C code, you can either build a shared library or a combined .o file as above. You don't need to use LD_LIBRARY_PATH - just tell GHCi where the library lives using the package spec. Cheers, Simon