如何强制xcode使用正确的iostream头文件
how to force xcode to use the correct iostream header c++
xcode 4.2
os x 10.7
当我把include设置成如下的样子时:
#include <iostream>
#include <boost/thread.hpp>
我从位于/opt/local/include/boost/tr1/tr1
Lexical or Preprocessor Issue
'boost/tr1/detail/config_all.hpp' file not found
/opt/local/include/boost/tr1/tr1/iostream
文件内容:
// (C) Copyright John Maddock 2005.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// This file exists to prevent std lib headers from accidentally
// including a TR1 extention header; we must suppress this otherwise
// we can end up with cyclic dependencies with some std lib implementations.
//
#ifndef BOOST_TR1_iostream_INCLUDED
# define BOOST_TR1_iostream_INCLUDED
# ifndef BOOST_TR1_NO_RECURSION
# define BOOST_TR1_NO_RECURSION
# define BOOST_TR1_NO_iostream_RECURSION
# endif
# include <boost/tr1/detail/config_all.hpp>
# if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT)
# include_next <iostream>
# else
# include BOOST_TR1_STD_HEADER(iostream)
# endif
# ifdef BOOST_TR1_NO_iostream_RECURSION
# undef BOOST_TR1_NO_iostream_RECURSION
# undef BOOST_TR1_NO_RECURSION
# endif
#endif
我应该使用位于/Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/
的iostream标头
你必须原谅我,因为我对c++很陌生,对xcode更陌生。提前感谢您的任何帮助。
一定要关闭递归搜索。在没有指定完整的boost路径的情况下,永远不能包含boost头文件。Boost的大部分功能都是一个训练基地,这些功能最终会进入标准,因此有大量的Boost头文件与标准头文件共享相同的名称。还有一堆boost头与其他boost头共享相同的名称。这会给你带来无尽的悲伤。
相关文章:
- 磁力计代码:C++ vs C - iosstream,矢量 - 错误iostream:没有这样的文件或目录
- 通过boost asio iostream下载大文件的最快方法是什么?
- 为什么 VScode 在 .h 文件中显示"'iostream' file not found"?
- 包含iostream导致不同的二进制文件
- Xcode 11.1:找不到 iostream 的文件
- 将文件从 iOS 应用程序加载到 C++ 对象中/<iostream>iOS 上的问题
- 找不到'iostream'文件 Xcode
- 在代码::块中找不到iostream文件
- 通过包含<iostream>头文件,它的所有 8 个函数是写入我的代码,还是只写入我在程序中使用的函数?
- Clang无法在macOS中编译基本的头文件(如<iostream>)
- 数字火星编译器(代码::块)无法打开文件'iostream'
- 读取.csv文件并仅使用 C++ 存储到数组中<iostream>
- 在 WSL 上编译时找不到"iostream"文件
- 在 Clang++ 中查找 iostream:致命错误:"iostream"文件未找到
- 找不到iostream文件
- 找不到'iostream'文件
- 致命错误: iostream: 没有这样的文件或目录 3.
- 缺少来自MinGW的iostream.h文件
- c++链接器,如何链接iostream文件
- 代码::阻塞iostream.h文件丢失