Cuda Clang and OS X Mavericks

后端 未结 6 1138
遇见更好的自我
遇见更好的自我 2020-11-29 09:37

I\'m currently trying to build a Cuda project with Cmake on MacOS 10.9. My C and C++ compiler are gcc, but it seems that since Mavericks gcc and g++ links to clang, which is

6条回答
  •  抹茶落季
    2020-11-29 10:28

    Clang become the default compiler with OsX Maverick release, gcc and g++ commands are redirected to the clang compiler. You can download gcc compiler via homebrew and link gcc and g++ commands back to the gcc compiler via following the steps below.

    $ brew install gcc48
    [...]
    
    $ sudo mkdir /usr/bin/backup && sudo mv /usr/bin/gcc /usr/bin/g++ /usr/bin/backup
    $ sudo ln -s /usr/local/bin/gcc-4.8 /usr/bin/gcc
    $ sudo ln -s /usr/local/bin/g++-4.8 /usr/bin/g++
    

    I have found the solution on this article: http://gvsmirnov.ru/blog/tech/2014/02/07/building-openjdk-8-on-osx-maverick.html#all-you-had-to-do-was-follow-the-damn-train-cj

提交回复
热议问题