RE: Linking with object files

I get the error.. can't find module 'foo.o'
On Wednesday 08 January 2003 10:04 am, Simon Marlow wrote: processing "foo.o">
I think you must be using a version of GHC prior to 5.04.2. This functionality was fixed in 5.04.2.
I just checked, it really is (or claims to be:-) version 5.04.2. I get the same error using 5.04.2 under Linux too.
What command line are you using? Here's what I did: ~/scratch > cat >foo.c ~/scratch > gcc -c foo.c ~/scratch > ghc --make hello.hs foo.o ghc-5.04.2: chasing modules from: hello.hs Skipping Main ( hello.hs, ./hello.o ) ghc: linking ... ~/scratch > Actually I was incorrect before: this has worked fine in 5.04, 5.04.1 and 5.04.2. The fix made in 5.04.2 was to pass files without a recognised extension through to the linker, to match the behaviour without --make. Cheers, Simon

On Wednesday 08 January 2003 5:00 pm, Simon Marlow wrote:
What command line are you using? Here's what I did:
~/scratch > cat >foo.c ~/scratch > gcc -c foo.c ~/scratch > ghc --make hello.hs foo.o ghc-5.04.2: chasing modules from: hello.hs Skipping Main ( hello.hs, ./hello.o ) ghc: linking ... ~/scratch >
The exact command line I'm using is.. ghc --make -fglasgow-exts -Wall -o Main.exe Main.hs Fill.o Render.o which gives.. ghc-5.04.2: chasing modules from: Main.hs,Fill.o,Render.o ghc-5.04.2: can't find module `Fill.o' (while processing "Fill.o") But playing about a bit, I found the solution. It doesn't like upper case object file names. Not sure if that's by design or an oversight. I've changed them to lower case and it works fine now. Regards -- Adrian Hey
participants (2)
-
Adrian Hey
-
Simon Marlow