FFI, Ghc and Libs

Simon Marlow simonmar at microsoft.com
Mon Aug 9 08:21:12 EDT 2004


GHCi supports loading .o and .DLL files only, I'm afriad.  Although I
believe it might be possible to link against .LIB files when linking a
standalone binary.
 
Cheers,
    Simon

________________________________

From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-bounces at haskell.org] On Behalf Of Dominik
Oesterreich
Sent: 02 August 2004 16:22
To: glasgow-haskell-users at haskell.org
Subject: FFI, Ghc and Libs


Hello,
 
i have one Problem with ghc (and FFI).
 
I wrote some functions in C and compiled that file. After that I typed:
 
 
ghci -fffi komplett.obj test.lhs -l apr.lib
 
and got the following error meassage:


Loading package base ... linking ... done
Warning: ignoring unrecognised input 'apr.lib'
Loading object (static) kompett.obj ... done
Loading object (dynamic) ... failed.
Dynamic Linker error message was: 
    addDLL: unknown error
Whilst trying to load (dynamic)
Directories to search are:
    C:\ghc\ghc-6.2.1\bin
ghc.exe: user specified .o/.so/.DLL could not be loaded
 
 
 
I have to use different Libraries from Subversion (subversion.tigris.org
=>
http://subversion.tigris.org/files/documents/15/14892/svn-win32-1.0.6_de
v.zip).
 
Dominik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/glasgow-haskell-users/attachments/20040809/505730b5/attachment.htm


More information about the Glasgow-haskell-users mailing list