Mac下一个/usr/include失踪

原文链接:http://www.cnblogs.com/mengfanrong/p/4738790.html

Mac升级到Yosemite后,突然发现vim的YouCompleteMe代码提示所以空头支票成员,排查了一下,原本/usr/include目录中缺少。所有的C/C++头文件不见了。

。。

第一次发现这个问题。不知道是不是每次Mac升级都会删除/usr/include,还是仅仅在不兼容的时候删除,非常诡异。

Mac下有个专门管理开发环境的工具xcode-select,通过它能够下载命令行开发工具(包含gcc等等)。执行:

xcode-select --install

上面命令会去下载安装命令行开发工具,完毕之后/usr/include就出现了。

这个工具也可以用来管理XCode多版本,详细man xcode-select

版权声明:本文博客原创文章。博客,未经同意,不得转载。

转载于:https://www.cnblogs.com/mengfanrong/p/4738790.html

展开阅读全文
博主设置当前文章不允许评论。

错误在标准库?? /usr/include/g++-3/stl_algobase.h

11-29

c++ -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -c msnuser2.cpprnIn file included from msnuser.h:11,rnfrom msnuser2.cpp:1:rnchat.h:93:6: warning: no newline at end of filernchat.h:93:6: warning: no newline at end of filern/usr/include/g++-3/stl_algobase.h: In function `_OutputIter copyrn(_InputIter, _InputIter, _OutputIter) [with _InputIter = CanShu **,rn_OutputIter = CanShu **]':rn/usr/include/g++-3/stl_algobase.h:184: template instantiation depthrnexceeds maximum of 17 (use -ftemplate-depth-NN to increase the maximum)rninstantiating `struct iterator_traits'rn/usr/include/g++-3/stl_algobase.h:184: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = CanShu **, _OutputIter = CanShu **]'rn/usr/include/g++-3/stl_deque.h:1629: instantiated from `deque::_M_reallocate_map (unsigned int, bool) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:925: instantiated from `deque::_M_reserve_map_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:1580: instantiated from `deque::_M_new_elements_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:898: instantiated from `deque::_M_reserve_elements_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:1256: instantiated from `deque::insert (typename _Deque_base::iterator, _ForwardIterator, _ForwardIterator, forward_iterator_tag) [with _ForwardIterator = _Deque_iterator, _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:791: instantiated from `deque::_M_insert_dispatch (typename _Deque_base::iterator, _InputIterator, _InputIterator, __false_type) [with _InputIterator = _Deque_iterator, _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:778: instantiated from `deque::insert (typename _Deque_base::iterator, _InputIterator, _InputIterator) [with _InputIterator = _Deque_iterator, _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:621: instantiated from `deque::operator= (const deque &) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_algobase.h:139: instantiated from `__copy (_RandomAccessIter, _RandomAccessIter, _OutputIter, random_access_iterator_tag, _Distance *) [with _RandomAccessIter = _Deque_iterator, _OutputIter = _Deque_iterator, _Distance = ptrdiff_t]'rn/usr/include/g++-3/stl_algobase.h:161: instantiated from `__copy_dispatch::copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator, _BoolType = __false_type]'rn/usr/include/g++-3/stl_algobase.h:188: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator]'rn/usr/include/g++-3/stl_deque.h:617: instantiated from `deque::operator= (const deque &) [with _Tp = Command, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_algobase.h:139: instantiated from `__copy (_RandomAccessIter, _RandomAccessIter, _OutputIter, random_access_iterator_tag, _Distance *) [with _RandomAccessIter = _Deque_iterator, _OutputIter = _Deque_iterator, _Distance = ptrdiff_t]'rn/usr/include/g++-3/stl_algobase.h:161: instantiated from `__copy_dispatch::copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator, _BoolType = __false_type]'rn/usr/include/g++-3/stl_algobase.h:188: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = _Deque_iterator, _OutputIter = _Deque_iterator]'rn/usr/include/g++-3/stl_deque.h:617: instantiated from `deque::operator= (const deque &) [with _Tp = MsnUser, _Alloc = allocator, unsigned int __bufsiz = 0]'rnmsnuser2.cpp:565: instantiated from herern/usr/include/g++-3/stl_algobase.h:184: invalid use of undefined typern`struct iterator_traits'rn/usr/include/g++-3/stl_iterator.h:101: forward declaration of `structrniterator_traits'rn/usr/include/g++-3/stl_algobase.h:186: template instantiation depthrnexceeds maximum of 17 (use -ftemplate-depth-NN to increase the maximum)rninstantiating `struct iterator_traits'rn/usr/include/g++-3/stl_algobase.h:186: instantiated from `copy (_InputIter, _InputIter, _OutputIter) [with _InputIter = CanShu **, _OutputIter = CanShu **]'rn/usr/include/g++-3/stl_deque.h:1629: instantiated from `deque::_M_reallocate_map (unsigned int, bool) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:925: instantiated from `deque::_M_reserve_map_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:1580: instantiated from `deque::_M_new_elements_at_front (unsigned int) [with _Tp = CanShu, _Alloc = allocator, unsigned int __bufsiz = 0]'rn/usr/include/g++-3/stl_deque.h:898: instantiated from rn...........rnrn/usr/include/g++-3/stl_algobase.h:291: template argument 1 is invalidrn/usr/include/g++-3/stl_algobase.h:291: template argument 3 is invalidrngmake: *** [msnuser2.o] Error 1rn*** failed ***rnrn怎么都试标准库里的 不是我的代码呢?rnrn环境试linux ad server 3rn这个代码在 redhat 7.3 freebsd 5.4 fc3.0 里面都没有问题的rn在这里有这个问题rn 论坛

没有更多推荐了,返回首页