Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 目标C类中的Boost矩阵未编译_C++_Objective C_Xcode_Boost_Compilation - Fatal编程技术网

C++ 目标C类中的Boost矩阵未编译

C++ 目标C类中的Boost矩阵未编译,c++,objective-c,xcode,boost,compilation,C++,Objective C,Xcode,Boost,Compilation,我需要在Objective/Foundation项目中使用一些boost(boost/numeric/ublas/matrix.hpp)。我安装了使用自制程序的升压(一个IT在C++ xCODE项目中工作)。 我在Lion10.7.2下使用XCode 4.2.1(Clang3.0)。我创建了空基础工程,添加了新的Objc类,包含了 < >。这给了我无数的警告 My MAMatrix.mm(.mm表示ObjC++): #导入“MAMatrix.h” #包括 @乳房矩阵的实现 -(id)initW

我需要在Objective/Foundation项目中使用一些boost(
boost/numeric/ublas/matrix.hpp
)。我安装了使用自制程序的升压(一个IT在C++ xCODE项目中工作)。 我在Lion10.7.2下使用XCode 4.2.1(Clang3.0)。我创建了空基础工程,添加了新的Objc类,包含了 < <代码> >。这给了我无数的警告

My MAMatrix.mm(.mm表示ObjC++):

#导入“MAMatrix.h”
#包括
@乳房矩阵的实现
-(id)initWithSize:(nsInteger)aSize
{    
return[self initWithHeight:aSize
宽度:aSize];
}
-(id)initWithHeight:(nsInteger)一个八
宽度:(nsu整数)anWidth
{    
self=[super init];
如果(自我){
;
}
回归自我;
}
@结束
我越来越

In file included from MAMatrix.mm:11:
In file included from /usr/local/include/boost/numeric/ublas/matrix.hpp:16:
In file included from /usr/local/include/boost/numeric/ublas/vector.hpp:19:
In file included from /usr/local/include/boost/numeric/ublas/storage.hpp:26:
In file included from /usr/local/include/boost/numeric/ublas/traits.hpp:24:
In file included from /usr/local/include/boost/type_traits.hpp:35:
In file included from /usr/local/include/boost/type_traits/has_operator.hpp:12:
In file included from /usr/local/include/boost/type_traits/has_bit_and.hpp:43:
/usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:157:4: error: expected expression
   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP ...
   ^
/usr/local/include/boost/config/suffix.hpp:431:72: note: instantiated from:
#     define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
                                                                       ^
/usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:157:121: note: instantiated from:
   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))=...
                                                                                                                        ^
MAMatrix.mm:11中包含的文件中的
:
在/usr/local/include/boost/numeric/ublas/matrix.hpp中包含的文件中:16:
在/usr/local/include/boost/numeric/ublas/vector.hpp:19中包含的文件中:
在/usr/local/include/boost/numeric/ublas/storage.hpp:26中包含的文件中:
在/usr/local/include/boost/numeric/ublas/traits.hpp:24中包含的文件中:
在/usr/local/include/boost/type_traits.hpp:35中包含的文件中:
在/usr/local/include/boost/type_traits/has_operator包含的文件中。hpp:12:
在/usr/local/include/boost/type_traits/has_bit_和.hpp中包含的文件中:43:
/usr/local/include/boost/type_traits/detail/has_binary_运算符。hpp:157:4:错误:预期表达式
BOOST\u STATIC\u CONSTANT(bool,value=(sizeof)(check)((make()BOOST\u TT\u TRAIT\u OP.)。。。
^
/usr/local/include/boost/config/suffix.hpp:431:72:注意:实例化自:
#定义BOOST_STATIC_常量(类型、赋值)STATIC const类型赋值
^
/usr/local/include/boost/type_traits/detail/has_binary_运算符。hpp:157:121:注意:实例化自:
BOOST_STATIC_常量(bool,value=(sizeof(check)((make()BOOST_TT_TRAIT_OP make()),make())=。。。
^

模板
结构运算符_存在{
static::boost::type_traits::yes_type check(has_运算符);//当运算符存在时,首选此版本
static::boost::type_traits::no_type check(no_操作符);//此版本用于其他情况
BOOST_STATIC_常量(bool,value=(sizeof(check)((make()BOOST_TT_TRAIT_OP make()),make())==sizeof(::BOOST::type_traits::yes_type));
};
我认为这可能是一个提升问题,因为STL在我的ObjC类中运行良好

谢谢您的帮助。

使用此解决方案

在Founfation.h之前,我在头文件中包含了
#include

最新的1.48.0升级版的怪异破解…

使用此解决

在Founfation.h之前,我在头文件中包含了
#include


最新1.48.0 Boost的怪异破解…

我不能为你做怪异破解。太多的源文件,太复杂的头文件依赖性,使类似的东西无法工作。我正在从boos 1.35.0升级到Boost 1.48.0。现在我已经为我们解决了这个问题,只是暂时升级到1.47.0。同样的问题在这里,无法使用你的破解,但将关闭如果可能的话,ade也可以升级到1.47。只是尝试了1.49.0,它也不起作用。有人知道如何联系boost人员并通知他们这个问题吗?我不能进行奇怪的黑客攻击。太多的源文件,太复杂的头文件依赖性使类似的东西无法工作。我正在从boos 1.35.0升级到boost 1.48.0。现在我已经解决了这个问题目前只升级到1.47.0,这对我们来说是个问题。这里有同样的问题,无法使用你的黑客,但如果可能的话,也会降级到1.47。只是尝试了1.49.0,它也不起作用。有人知道如何联系boost人员并通知他们这个问题吗?
In file included from MAMatrix.mm:11:
In file included from /usr/local/include/boost/numeric/ublas/matrix.hpp:16:
In file included from /usr/local/include/boost/numeric/ublas/vector.hpp:19:
In file included from /usr/local/include/boost/numeric/ublas/storage.hpp:26:
In file included from /usr/local/include/boost/numeric/ublas/traits.hpp:24:
In file included from /usr/local/include/boost/type_traits.hpp:35:
In file included from /usr/local/include/boost/type_traits/has_operator.hpp:12:
In file included from /usr/local/include/boost/type_traits/has_bit_and.hpp:43:
/usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:157:4: error: expected expression
   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP ...
   ^
/usr/local/include/boost/config/suffix.hpp:431:72: note: instantiated from:
#     define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
                                                                       ^
/usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:157:121: note: instantiated from:
   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))=...
                                                                                                                        ^
template < typename Lhs, typename Rhs >
struct operator_exists {
   static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
   static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise

   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
};