更新到Sierra I后,我的Xcode从7.2.1更新到Xcode 8.因此,问题可能只是通过更新Xcode而发生。我降级到7.2.1,仍然遇到同样的问题。警告:更新到Mac OSX Sierra后不再推荐使用“__textcoal_nt”部分
这是编译C++程序
/var/folders/cj/1h3_84h56c9bgzt_ryhpf4940000gn/T//ccgjxtCM.s:4:11: warning: section "__textcoal_nt" is deprecated
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/cj/1h3_84h56c9bgzt_ryhpf4940000gn/T//ccgjxtCM.s:4:11: note: change section name to "__text"
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/cj/1h3_84h56c9bgzt_ryhpf4940000gn/T//ccgjxtCM.s:54:11: warning: section "__textcoal_nt" is deprecated
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
^ ~~~~~~~~~~~~~
/var/folders/cj/1h3_84h56c9bgzt_ryhpf4940000gn/T//ccgjxtCM.s:54:11: note: change section name to "__text"
.section __TEXT,__textcoal_nt,coalesced,pure_instructions
程序仍然运行时,我得到的错误,但会显示此消息。即使代码中唯一的东西是我制作的叫做graph的类,并且我有这样的代码,错误也会出现。
void explore(Graph & G, int x)
{
Node* nodePtr = &G.changeNode(x);
}
我试着在命令行这样做的,也没有工作
sudo xcode-select -s /Library/Developer/CommandLineTools
这是我在崇高的文本使用的生成,但即使与其他C++编译器,这不是C++ 11我犯了同样的错误。错误也出现在命令行上。
{
"shell_cmd": "g++ -std=c++11 \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell_cmd": "g++ -std=c++11 \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
}
我觉得可以用,我已经看到了一些线程在这个网站
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151012/305992.html
我不知道如何使用它们或者虽然运行补丁工作的唯一的事。
我得到了同样的问题也是如此。我以前问过一个稍微类似的问题http://stackoverflow.com/questions/39502921/warning-section-const-coal-is-deprecated-error-after-updating-xcode-to-la/39522660#39522660哪些问题得到了解决在切换命令行路径之后,但在我解析并更新到MacOS Sierra之后,它再次出现了所有这些错误。 – iteong
感谢您的信息。让我知道你是否知道它。 – djent