Re: Haskell calling D code through the FFI

2014-08-06 Thread David Soria Parra via Digitalmars-d-learn
Jon via Digitalmars-d-learn digitalmars-d-learn@puremagic.com writes: So that does indeed solve some of the problems. However, using this method, when linking I get two errors, undefined reference rt_init() and rt_term() I had just put these methods in the header file. If I put wrappers

Re: Haskell calling D code through the FFI

2014-08-05 Thread David Soria Parra via Digitalmars-d-learn
On Monday, 4 August 2014 at 20:48:09 UTC, Jon wrote: For reasons I don't completely understand, you also need a fake main function, dummy.d: void main(){} Note that this is not necessary if you compile with -lib e.g.: dmd -lib -oflibtest.a test.d and then ghc Main.hs --make

Attach and detach C threads to D runtime

2014-05-22 Thread David Soria Parra via Digitalmars-d-learn
Hi, I am currently writing a fuse wrapper for D and try to support fuse multithreading which is based on pthreads. However fuse doesn't offer me a proper way to hook into the creation and joining process of threads. I can attach the threads created by libfuse but cannot find a way to properly