GHC and Windows (DLL/FFI) woes
Simon Marlow
simonmar at microsoft.com
Mon Oct 24 06:01:14 EDT 2005
On 23 October 2005 19:00, Esa Ilari Vuokko wrote:
> I have been trying to build some Windows DLLs with
> GHC, and I have run into some misfeatures or maybe
> I have misunderstood how to use GHC. Any help or
> advice would be appreciated. :)
>
> First of all, I can't get ghc to generate stubs from
> foreign export in anywhere else than next to original
> source, which is sort of annoying. I would like all
> the generated files to go quite a bit diffrent place than
> source directory.
We don't have a flag for that; perhaps we should. Or perhaps there
should be a flag that says "put all generated files here", that subsumes
-odir, -hidir, -hcdir and also coveres _stub.{c,h} files.
> Next, --make and --mk-dll don't seem to work together.
> Ok, what I do, is I just --make -no-link and then --mk-dll
> all the object files I find :)
That's true. This is closer to working in 6.5, we should make it work
(if anyone's interested, this just means hooking up DriverPipeline.link
with DriverPipeline.doMkDLL in the right way).
> It seems that -i flag and compiling those _stub.c have
> following problem: if path given in -i flag contains any
> /- or \-characters, i.e. any real subpaths, it seems to
> stop with something like:
>
\source\sunrise\haskell\haskell\..\debug\build\haskell\plugin-hs-test/d:
:
> createDirectory: invalid argument (Invalid argument)
> It seems a bit random what is the supposed "filename"
> part of the path, typically it contains drive letter and few
> colons, it doesn't seem totally random data.
Could you give me a detailed description of the problem: the exact
command line, and the error message that is produced. Thanks.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list