haskell / c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
http://hackage.haskell.org/package/c2hs
Other
199 stars 50 forks source link

c2hs.exe fails under windows and stack: $topdir #202

Closed KaneTW closed 6 years ago

KaneTW commented 6 years ago

Given ghc --info:

$ ghc --info
 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("GCC extra via C opts"," -fwrapv -fno-builtin")
 ,("C compiler command","$topdir/../mingw/bin/gcc.exe")
...

c2hs as invoked by stack fails with:

'$topdir' is not recognized as an internal or external command,
operable program or batch file.
c2hs.exe: Failed to compile 'bool' size test program!
KaneTW commented 6 years ago

See #203 for a fix