Interface Files _ HOWTO?
Michael Weber
michael.weber@post.rwth-aachen.de
Fri, 20 Oct 2000 18:45:27 +0200
On Fri, Oct 20, 2000 at 18:09:04 +0200, Ingo Sander wrote:
> So, how do I compile this in GHC? I hoped, that it would be enough to
> compile all files with the -c option (generating .hi and .o files) and
> then compiling Main.hs to get an executable program. Howeve, I get the
> following:
>
>> ghc Main.hs
[...]
> ld: fatal: Symbol referencing errors. No output written to a.out
try
$ ghc -c Main.hs
$ ghc -o ThisIsMyExecutable *.o
That is, compile Main.hs also into an .o file, /then/ link the whole
thing into an executable...
> So, what's wrong, and am I totally on the wrong track... (I studied the
> GHC User Guide, but could not find the answer to my problem).
normally, one employs `make' for building programs with more than one
module, because it keeps track of dependencies (ghc -M *hs) etc. There
is a users-guide section on Makefiles for GHC, IIRC.
HTH
Cheers,
Michael
--
/~\ ASCII ribbon | "Never buy anything that mentions Windows on the package.
\ / campaign | Except sheets of glass. Or plastic. And that smelly
X against | blue stuff that removes dirt without leaving a residue."
/ \ HTML mail | -- jhickle<at>pgh.nauticom.net in c.o.l.d.s.