AW: Using Haskell code in VBA (MS Access)?
Fri, 20 Oct 2000 13:04:03 +0200
I tried to compile this small example with ghc-4.08.1, but it didn't =
work (compiling ok., but DLL does not run), while with ghc-4.05 =
everything is okay. What can be wrong with this?
> -----Urspr> =FCngliche Nachricht-----
> Von: Sigbjorn Finne [SMTP:firstname.lastname@example.org]
> Gesendet am: Donnerstag, 17. August 2000 20:18
> An: 'Christian Lescher'
> Cc: email@example.com
> Betreff: RE: Using Haskell code in VBA (MS Access)?
> The support libraries for HaskellDirect provide
> functions for converting between BSTRs and Haskell'
> String (Com.marshallBSTR, Com.unmarshallBSTR) --
> has the overview. However, the binaries available for
> that library is for ghc-4.045, so you'd have to compile
> them up yourself for ghc-4.08.
> To build a 'static' DLL, here's what you need to do:
> - compile up all your Haskell code using -static.
> - write a .def file containing the entry points you
> want to expose. In my example, the .def file would
> just contain:
> - link the static DLL:
> ghc-4.05 -static --mk-dll -optdll--def=3Dadder.def \
> -o adder.dll adder.o dllMain.o -lHSrts
> I heard some rumours that -static might disappear. If that's
> the case, I think that would be unfortunate.
> Christian Lescher <firstname.lastname@example.org> writes:
> > Thank you for your detailed answer - it's really great, it works! =
> > However, I have got one more problem: the function I want to=20
> > call from VBA is of
> > type String -> String -> String
> > Is there a (simple) method to convert VBA strings (BSTR) to=20
> > Haskell's [Char] and
> > vice versa?
> > By the way: Is it possible to build DLLs that do not depend=20
> > on GHC's runtime DLLs?
> > I tried out the "-static" option like for compiling EXEs, but=20
> > it didn't work.
> > CL