ghc - force library search order

John Lask jvlask at
Fri May 29 10:19:27 EDT 2009

----- Original Message ----- 
From: "Duncan Coutts" <duncan.coutts at>
To: "John Lask" <jvlask at>
Sent: Friday, May 29, 2009 8:09 PM
Subject: Re: [Haskell-cafe] ghc - force library search order

> On Fri, 2009-05-29 at 18:08 +1000, John Lask wrote:
>> I need to force a library to be searched for unresolved symbols after all
>> other libraries have been searched, and I would rather not resort to
>> constructing the linker command line directly. Is there a way to do this?
>> i.e. I want for example -lfoo to appear after all other haskell libraries
>> and before system libraries (for example -lmsvcrt) once ghc has 
>> constructed
>> the link command. i.e. how is it possible to coerce ghc into respecting
>> dependencies between the libraries. GHC does a good job in general with
>> native libraries, but there are allways corner cases.
>> I have a feeling this is not possible, but it dosn't hurt to ask.
> If you don't get a reply then ask on the ghc users mailing list.
> Duncan

More information about the Glasgow-haskell-users mailing list