AccelerateCompat.hs compiling failed
HuangFJ opened this issue · comments
Jon Huang commented
When i run the command below:
ghc -O2 fwaccel-gpu.hs -threaded
it states:
AccelerateCompat.hs:3:27:
error: token is not a valid binary operator in a preprocessor subexpression
#if MIN_VERSION_accelerate(0, 14, 0)
~~~~~~~~~~~~~~~~~~~~~~^
1 error generated.
Jon Huang commented
I googled it and found the solution here:
http://stackoverflow.com/questions/12546757/how-do-i-use-cabals-min-version-and-other-macros-with-ghci
I need the flags "-optP-include -optPdist/build/autogen/cabal_macros.h" when run ghc:
ghc -O2 fwaccel-gpu.hs -threaded -optP-include -optPdist/build/autogen/cabal_macros.h