Adding gcc 4.9 as a compiler option in Xcode

醉酒当歌 提交于 2019-12-10 21:28:31

问题


I just installed gcc 4.9 (with C11 support), and want to add it to Xcode 4.6.3's build options as a compiler option. I ran make and make install, and the packages are all there (under /usr/bin/gcc. Running gcc --version confirms that gcc 4.9 is installed rather than an older version.

When I go into an existing Xcode project's build settings, the only compiler options available are

  • Apple LLVM compiler 4.2

  • LLVM GCC 4.2

  • Other...

Clearly, GCC 4.9 would have to be added using the "Other..." option, although I'm not sure how. I've tried inputting the path to gcc (/usr/bin/gcc), although the default value for other isn't a path at all: com.apple.compilers.llvmgcc42.

I've also tried following the instructions from the answer to this question as well, but the machine I'm on doesn't have the /Developer directory at all, since I believe Apple integrated the developer tools that required (and created) this directory into Xcode.

How do I add gcc 4.9 as a compiler option in Xcode?

来源:https://stackoverflow.com/questions/17289216/adding-gcc-4-9-as-a-compiler-option-in-xcode

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