ghc --make with .o files

Andre Pang
Mon, 30 Jun 2003 16:36:40 -0700

On Monday, June 30, 2003, at 01:52 AM, Simon Marlow wrote:

>> If you pass a list of .o files---and only .o files (i.e. no .hs
>> files)---to GHC, and --make is specified, nothing happens.  Is it
>> possible to change this behaviour so that GHC will link the .o files
>> together into an executable?
> Not possible at the moment, I'm afraid.  GHC's intelligence about which
> packages to link comes from inspecting the interfaces for the compiled
> modules, not from the .o files themselves.  This is why one-shot 
> linking
> needs to have explicit -package flags on the command line.
> Is there some reason you can't use ghc --make in the normal way?

I'm trying to integrate GHC with Apple's Project Builder IDE (which 
will soon be deprecated in favour of their new IDE, Xcode).  Project 
Builder follows the standard C linking process: it compiles each file 
individually, and then links them all together at the end with a 
linking command.

'tis not a big hassle; I'm doing the linking without --make right now, 
and that works okay.  The only downside is that you have to specify the 
packages to link in too.

% Andre Pang : just.your.average.bounty.hunter