quot;warning: section quot;__const_coalquot; is deprecatedquot; error after updating Xcode to latest version on Mac OS(“警告:“__const_coal部分已弃用在 Mac OS 上将 Xcode 更新到最新版本后出错)
问题描述
在我将 Xcode 更新到最新版本并接受许可协议之前,我的 C++ 程序的 g++ 编译器运行良好.我也尝试使用 clang 而不是 g++ 进行编译,但出现错误.现在我收到一长串错误.任何人都知道出了什么问题?
My g++ compiler for C++ program was working fine until I updated my Xcode to the latest version and accepted the license agreement. I also tried compiling with clang instead of g++ but got errors. Now I get a long stream of errors. Anyone has an idea what is wrong?
Ivans-MacBook-Pro:CS6771A3-GenericDirectedWeightedGraph ivanteong$ g++ -std=c++14 -Wall -Werror -O2 -o test6 tests/test6.cpp
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:1:11: warning: section "__textcoal_nt" is deprecated
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:1:11: note: change section name to "__text"
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:211:11: warning: section "__textcoal_nt" is deprecated
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:211:11: note: change section name to "__text"
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:604:11: warning: section "__textcoal_nt" is deprecated
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:604:11: note: change section name to "__text"
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
推荐答案
我在更新到 Xcode v8.0 时收到了完全相同的警告.但是,您不需要卸载 Xcode.相反,您需要设置活动开发者目录的路径:
I was getting the exact same warnings on updating to Xcode v8.0. However, you do not need to uninstall Xcode. Rather, you need to set the path of the active developer directory:
sudo xcode-select -s /Library/Developer/CommandLineTools
这篇关于“警告:“__const_coal"部分已弃用"在 Mac OS 上将 Xcode 更新到最新版本后出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“警告:“__const_coal"部分已弃用"在 Mac OS 上将 Xcode 更新到最新版本后出错
- C++ 协变模板 2021-01-01
- 如何对自定义类的向量使用std::find()? 2022-11-07
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01
- STL 中有 dereference_iterator 吗? 2022-01-01
- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01
- 从python回调到c++的选项 2022-11-16
- 静态初始化顺序失败 2022-01-01
- 近似搜索的工作原理 2021-01-01
- Stroustrup 的 Simple_window.h 2022-01-01