Using gcc instead of clang in ghci or ghc

我与影子孤独终老i 提交于 2019-11-30 09:37:26
Carter Tazio Schonwald

Reproducing my directions I've been sharing with haskellers for the past few months via https://gist.github.com/cartazio/7131371

  1. Type ghc --print-libdir

    The output will be a path like /Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3

  2. Go to that directory and edit the settings file.

  3. There'll be a line indicating the path to the C compiler. It'll probably say /bin/gcc

  4. Change that line to /usr/local/bin/gcc-4.8 (or whichever gcc version you brew installed, such as /usr/local/bin/gcc-4.2)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!