Linking shared libraries

Andre Pang ozone at
Sun Apr 24 08:07:24 EDT 2005

On 22/04/2005, at 10:42 AM, Benjamin Franksen wrote:

> I know that ghc cannot produce shared libraries on all systems, but 
> what about
> just linking existing ones (i.e. for ffi code)? Is there a secret 
> command
> line switch for that, or do I have to use the C linker? Is there an 
> option in
> cabal that I have been missing that could help me?

If I understand you correctly, all you have to do is pass the 
-lLibraryName flag on the GHC command-line, just as you would with gcc.

% Andre Pang :  <>

More information about the Glasgow-haskell-users mailing list