我是靠谱客的博主 动听招牌,这篇文章主要介绍boost库和Eigen库冲突的解决,现在分享给大家,希望可以做个参考。

作者:朱金灿

来源:http://blog.csdn.net/clever101

 

        在使用vs2013编写一个程序中同时使用boost库和Eigen库,出现一个编译错误:

错误       C2039     “setConstant”: 不是“Eigen::PlainObjectBase<Derived>”的成员 AlgoDefine       d:srcthirdpartylibeigenincludesrcCoreCwiseNullaryOp.h

 

     开始百思不得其解,后来想到可能是boost库和Eigen库存在一些定义冲突。开始是将boost库的包含头文件放在Eigen库包含头文件的前面,现在改为:

复制代码
1
2
3
4
5
6
7
8
9
10
11
#include <Dense> #include "Ublas.h" #include <boost/numeric/ublas/vector_proxy.hpp> #include <boost/numeric/ublas/triangular.hpp> #include <boost/numeric/ublas/lu.hpp> #include <boost/numeric/ublas/io.hpp>

     再次编译就没有这个编译错误了。

最后

以上就是动听招牌最近收集整理的关于boost库和Eigen库冲突的解决的全部内容,更多相关boost库和Eigen库冲突内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部