带GCC的Xcode 6.1.1无法更改构建选项

时间:2015-01-29 13:51:00

标签: c++ ios xcode macos gcc

使用Yosemite 10.10中的Xcode 6.1.1中的c ++,使用提供的代码处理ios开发项目。 LLVM导致各种编译错误。想要使用GCC。一直在寻找方向开始,但现在我被卡住了。

下载GCC,版本4.2.1(Apple Inc. build 5666)(第3点)

尝试在Xcode下添加编译路径,但失败了。

编辑.bash_profile以利用这些导出路径和别名。 export CC=/usr/bin/gcc-4.2 export CPP=/usr/bin/cpp-4.2 export CXX=/usr/bin/g++-4.2 alias gcc="gcc-4.2" alias g++="g++-4.2"

还使用xcode-select --install安装了命令行工具。

当我运行xcrun gcc --version时,我得到 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.1.0 Thread model: posix

相对来说是mac世界的新用户,但我正在学习。在尝试获取此设置后,不确定为什么我无法从构建设置中选择使用GCC 4.2.1进行编译。任何帮助,将不胜感激。

0 个答案:

没有答案