Broken c++ std libraries on macOS High Sierra 10.13

北慕城南 提交于 2019-11-28 17:14:24
Anton Malmygin

I had exactly the same problem after transferring to macOS High Sierra (though, errors were not the same, but similar).

I found a workaround by renaming /usr/local/include to /usr/local/include_old (well, name does not really matter, just the fact that g++/clang will not search for headers in this folder anymore).

Andres Vidal

I had exactly the same problem today and after executing xcode-select --install, everything works fine!

I had the same issue after upgrading to MacOS Mojave 10.14.4 and Xcode 10.2

The issue got resolved, after installing the package /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

peter

I had a similar issue that after upgrading to high sierra (and Xcode 9.1) that my standard make reported unfamiliar warnings.

It drew .h files from /usr/local/include instead from the (as I thought) standard /usr/include. For example, there was no zlib.h available.

Reinstalling Xcode (who claims to install the commandline version too) did not help.

There was no /usr/include at all but the C++ system include were available through the links reported in clang --version, but none of the C-includes.

After xcode-select --install and actually "install" of the commandline material the /usr/include was populated with the necessary C libraries, and make started to compile without warnings again.

Check that you don't include "/usr/local/include" into headers search path of your project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!