Hi,
Here are some details on my building of HDirect with ghc-6.6, and where I am stuck.
Skipping details about deprecated libs (such as IOExts) and some name conflicts (NativeInfo), I succeeded in building the "ihc.exe", the "hdirect" and "com" libs.
I installed the "com" lib as a package on my system:
$ ghc-pkg.exe list
c:/ghc/ghc-6.6\package.conf:
[...] com-0.22, fgl-5.2, (ghc-6.6), [...]
$ ghc-pkg.exe describe com
name: com
version: 0.22
[...]
exposed: True
exposed-modules: AutoPrim Automation ClassFactory Com ComDll
ComException ComPrim ComServ Connection
ConnectionPoint
EnumInterface ExeServer HDirect Pointer PointerPrim SafeArray
StdDispatch StdTypes TypeLib WideString
[...]
extra-libraries: kernel32 user32 ole32 oleaut32 advapi32
From here, I tried to bootstrap the ihc compiler with the support for typelibs.
$ cd ../src
$ rm -f *.o
$ make depend SUPPORT_TYPELIBS=YES
$ make SUPPORT_TYPELIBS=YES
But the "make depend" fails :
$ make depend SUPPORT_TYPELIBS=YES
ghc -M -optdep-f -optdep.depend -optdep-o -optdepo -cpp -DBEGIN_SUPPORT_TYPELIB
S='-}' -DEND_SUPPORT_TYPELIBS='{-' -DBEGIN_NOT_SUPPORT_TYPELIBS='{-' -DEND_NOT_S
UPPORT_TYPELIBS='-}' -package com -fglasgow-exts -static -fvia-C -Rghc-timing
-Wall -package com AbsHUtils.lhs
AbstractH.lhs Attribute.lhs Bag.lhs BasicT
ypes.lhs CStubGen.lhs CgMonad.lhs CodeGen.lhs CoreIDL.lhs CoreUtils.lhs DefGen.l
hs Desugar.lhs DsMonad.lhs Env.lhs FiniteMap.lhs GetOpt.lhs HugsCodeGen.lhs IDLS
yn.lhs IDLToken.lhs IDLUtils.lhs ImportLib.lhs JavaProxy.lhs Lex.lhs LexM.lhs Li
bUtils.lhs Literal.lhs Main.lhs MarshallAbstract.lhs MarshallAuto.lhs MarshallCo
re.lhs MarshallDep.lhs MarshallEnum.lhs MarshallFun.lhs MarshallJNI.lhs Marshall
JServ.lhs MarshallMethod.lhs MarshallMonad.lhs MarshallServ.lhs MarshallStruct.l
hs MarshallType.lhs MarshallUnion.lhs MarshallUtils.lhs MkImport.lhs NameSupply.
lhs NormaliseType.lhs Opts.lhs PP.lhs PpAbstractH.lhs PpCore.lhs PpIDLSyn.lhs Pr
eProc.lhs Pretty.lhs Rename.lhs RnMonad.lhs Skeleton.lhs SrcLoc.lhs SymbolTable.
lhs TLBWriter.lhs TypeInfo.lhs Utils.lhs Validate.lhs CustomAttributes.hs Parser
.hs Version.hs OmgParser.hs NativeInfo.hs
ImportLib.lhs:39:7:
Could not
find module `TypeLib':
I do not understand why "TypeLib" is not found, as it is included in the "com" package.
This may be a newbie's question, excuse me if it has been answered millions of time.
Sincerely yours,
Samuel
PS : if I use the option in the src/Makefile, which consists in using "-i../comlib" and other flags instead of "-package com", the "make depend" works, but the following make fails as follows :
ghc -fglasgow-exts -static -fvia-C -Rghc-timing -Wall -i../lib -L../lib -I../lib -i../comlib -lole32 -loleaut32 -ladvapi32 -c ../comlib/AutoPrim.hs -o ../comlib/AutoPrim.o -osuf o
../comlib/AutoPrim.hs:69:0: Invalid type signature
Hope this helps.