" warning:section" __ const_coal"不推荐使用“在Mac OS上将Xcode更新为最新版本后出现错误 [英] "warning: section "__const_coal" is deprecated" error after updating Xcode to latest version on Mac OS

查看:241
本文介绍了" warning:section" __ const_coal"不推荐使用“在Mac OS上将Xcode更新为最新版本后出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的g ++编译器的C ++程序工作正常,直到我更新我的Xcode到最新版本并接受许可协议。我也尝试用clang而不是g ++编译,但有错误。现在我得到一个长流错误。

  Ivans-MacBook-Pro:CS6771A3-GenericDirectedWeightedGraph ivanteong $ g ++ -std = c ++ 14 -Wall -O2 -Werror -o TEST6测试/ test6.cpp 
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:1:11:警告:部分__textcoal_nt已经过时
.section伪__TEXT,__ textcoal_nt,凝聚,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:1: 11:注:更改栏目名称为__TEXT
.section伪__TEXT,__ textcoal_nt,凝聚,pure_instructions
^ ~~~~~~~~~~~~~
的/ var /文件夹/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:211:11:警告:部分__textcoal_nt已经过时
.section伪__TEXT,__ textcoal_nt,凝聚,pure_instructions
^ ~~~~~~~~ ~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:211:11:注:更改栏目名称为__TEXT
.section伪__TEXT,__ textcoal_nt,凝聚, pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/3d/hqly97ld37b1kd6wx9gjn2tc0000gn/T//ccZfBPvE.s:6​​04:11:警告:部分__textcoal_nt是弃用
.section伪__TEXT,__ textcoal_nt,凝聚,pure_instructions
^ ~~~~~~~~~~~~~
的/ var /文件夹/ 3D / hqly97ld37b1kd6wx9gjn2tc0000gn / T // ccZfBPvE。小号:604:11:注:更改栏目名称为__TEXT
.section伪__TEXT,__ textcoal_nt,凝聚,pure_instructions
^ ~~~~~~~~~~~~~

我在更新到Xcode v8.0时得到了完全相同的警告。

但是,您不需要卸载Xcode。相反,您需要设置活动开发人员目录的路径:

  sudo xcode-select -s / Library / Developer / CommandLineTools 


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
                 ^      ~~~~~~~~~~~~~

解决方案

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

这篇关于" warning:section" __ const_coal"不推荐使用“在Mac OS上将Xcode更新为最新版本后出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆