4
xcode 4.2
os x 10.7
當我把我的包含的樣子:如何強制Xcode中使用正確的iostream頭C++
#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的。預先感謝您的任何幫助。
你究竟做了什麼來定製你的包含路徑,以便它首先在/ opt中查找? – servn 2011-12-24 05:16:13
如果我在啓動之前啓動了包含路徑,它會引發各種錯誤。也許我需要取消遞歸搜索.... – Wes 2011-12-24 05:32:58
或者更確切地說,要讓它搜索具體提升的哪些部分,而不是全部提升。我只是怕,如果我不包括所有的提振,它會打破事情。我對此很陌生,很確定。 – Wes 2011-12-24 05:34:22