Packages (again)
Koen Claessen
koen@cs.chalmers.se
Mon, 9 Sep 2002 15:32:25 +0200 (MET DST)
Dear all,
Does anyone know how to create .a files for use with
packages? I have the following situation:
A directory 'PACK' with a number of ghc-generated object
(.o) files.
When I do the following:
$ ghc Test.o PACK/*.o -o Test
everything works fine. However, when I say:
$ cd PACK
$ ar -rvs libPack.a *.o
$ cd ..
And then do the following:
$ ghc Test.o -LPACK -lPack -o Test
GHC starts complaining about "warning: type and size of
dynamic symbol `<ModuleName>_<FunctionName>_closure' are not
defined". These are precisely the functions that the module
Test is using.
The above generates an executable, but results in a
segmentation fault.
Naturally, libPack.a cannot be used for a package either.
(Getting the same results.)
What am I doing wrong?
I am doing all this with ghc5.04 on SunOS4.
Thanks,
/Koen.
--
Koen Claessen
http://www.cs.chalmers.se/~koen
Chalmers University, Gothenburg, Sweden.