Hi folks! Is there a binary distribution of HDirect that works with the current version of ghc? In case there isn't any, how do I compile the latest version from cvs? Johannes
OK... I got it to compile... make boot; make; make install. It was that easy. ;-) Now I have a bunch of files residing in /usr/local/bin: ihc.exe /usr/local/lib: HDirect.lhs PointerPrim.dll WideString.hs libHShdirect.a HShdirect.o PointerPrim.hs hslibs-imports libHShdirect_p.a Pointer.lhs WideString.dll libHScom.a /usr/local/lib/hslibs-imports: hdirect /usr/local/lib/hslibs-imports/hdirect: HDirect.hi Pointer.hi PointerPrim.hi WideString.hi HDirect.p_hi Pointer.p_hi PointerPrim.p_hi WideString.p_hi /usr/local/share: AutoPrim.hi ComPrim.hi HDirect.hi SafeArrayPrim.c AutoPrim.hs ComPrim.hs HDirect.lhs StdDispatch.hi AutoPrimSrc.c ComPrimSrc.c HDirect.p_hi StdDispatch.lhs Automation.hi ComServ.hi Pointer.hi StdTypes.hi Automation.lhs ComServ.lhs Pointer.lhs StdTypes.hs ClassFactory.hi Connection.hi Pointer.p_hi TypeLib.hi ClassFactory.lhs Connection.hs PointerPrim.hi TypeLib.hs Com.hi ConnectionPoint.hi PointerPrim.hs WideString.hi Com.lhs ConnectionPoint.lhs PointerPrim.p_hi WideString.hs ComDll.hi EnumInterface.hi PointerSrc.c WideString.p_hi ComDll.lhs EnumInterface.lhs Registry.c WideStringSrc.c ComException.hi ExeServer.hi SafeArray.hi com.pkg ComException.lhs ExeServer.lhs SafeArray.hs hdirect.pkg I use ghc 6.0.1 for Windows (windows installer ditrib downloaded from haskell.org/ghc), which lives in c:/ghc/ghc-6.0.1/. Make install seems to have added the package hdirect to this ghc. The com package is missing... When trying to invoke ghci with -package com it prints out $ ghci -package com c:\ghc\GHC-60~1.1\bin\ghc.exe: unknown package name: com After copying the files above to c:/ghc/ghc-6.0.1/hslibs-imports/hdirect, c:/ghc/ghc-6.0.1/, and c:/ghc/ghc-6.0.1/imports respectively, calling ghci with -package hdirect gives me Loading package base ... linking ... done. Loading package lang ... linking ... done. Loading package hdirect ... linking ... c:/ghc/ghc-6.0.1/HShdirect.o: unknown symbol `___stginit_Word_' c:\ghc\GHC-60~1.1\bin\ghc.exe: panic! (the `impossible' happened, GHC version 6. 0.1): can't load package `hdirect' Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org, or http://sourceforge.net/projects/ghc/. I'm stuck. What is the correct way of integrating hdirect into ghc-6.0.1? Thanks very much, Johannes
Hi Johannes, You should go to the hdirect/comlib directory and make install-pkg Andre. Johannes Goetz wrote:
I use ghc 6.0.1 for Windows (windows installer ditrib downloaded from haskell.org/ghc), which lives in c:/ghc/ghc-6.0.1/. Make install seems to have added the package hdirect to this ghc. The com package is missing... When trying to invoke ghci with -package com it prints out
AS> You should go to the hdirect/comlib directory and AS> make install-pkg AS> Andre. Thanks, Andre! Now I can compile the ie-listen example... But I still have one problem: Loading package base ... linking ... done. Loading package haskell98 ... linking ... done. Loading package lang ... linking ... done. Loading package com ... linking ... done. Prelude> :load main Skipping Main ( main.lhs, ./main.o ) Ok, modules loaded: Main. Prelude Main> :load Main Skipping Main ( Main.lhs, ./Main.o ) Ok, modules loaded: Main. Prelude Main> main *** Exception: unknown IO error Reason: (0x800401f0) CoInitialize [has not been called]. Do you know why CoInitialize didn't get called? I thought that was what do coRun does... Do I have to build special libraries for ghci? Johannes
I have no idea of what is the problem this time, it works for me (with ghc/ghci 5.04.3). Not all examples work, though. So far I got only the following examples working: ie-listen, dir, string, env, server and math. comserv and comclient examples need typelibrary reading/writing which is not supported (at least with standard compilation of hdirect). Andre. Johannes Goetz wrote:
AS> You should go to the hdirect/comlib directory and AS> make install-pkg AS> Andre.
Thanks, Andre! Now I can compile the ie-listen example... But I still have one problem:
Loading package base ... linking ... done. Loading package haskell98 ... linking ... done. Loading package lang ... linking ... done. Loading package com ... linking ... done. Prelude> :load main Skipping Main ( main.lhs, ./main.o ) Ok, modules loaded: Main. Prelude Main> :load Main Skipping Main ( Main.lhs, ./Main.o ) Ok, modules loaded: Main. Prelude Main> main *** Exception: unknown IO error Reason: (0x800401f0) CoInitialize [has not been called].
Do you know why CoInitialize didn't get called? I thought that was what do coRun does... Do I have to build special libraries for ghci?
Johannes
participants (2)
-
Andre Santos -
Johannes Goetz