本文介绍了“警告:“__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 更新到最新版本后出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!