[Haskell-cafe] ffi call works fine in ghci but not as ghc compiledsegfault

Brandon Allbery allbery.b at gmail.com
Sat Mar 15 02:32:25 UTC 2014

On Fri, Mar 14, 2014 at 7:29 PM, Branimir Maksimovic <
branimir.maksimovic at gmail.com> wrote:

>  You are passing wchar_t* and function expects char*.

FWIW they asked this before (possibly on a different list) and, absent the
C information, I pointed out that Win32 API functions use CWString. This
was apparently taken to mean that CWString was the only option....

Some awareness of one's platform conventions tends to be helpful when doing
FFI. It seems to be absent here. :/

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140314/6ec5acf8/attachment.html>

More information about the Haskell-Cafe mailing list