boost库和Eigen库冲突的解决

栏目: C++ · 发布时间: 7年前

内容简介:作者:朱金灿来源:在使用vs2013编写一个程序中同时使用boost库和Eigen库,出现一个编译错误:

作者:朱金灿

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

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

错误       C2039     “setConstant”: 不是“Eigen::PlainObjectBase<Derived>”的成员 AlgoDefine       d:\src\thirdpartylib\eigen\include\src\Core\CwiseNullaryOp.h

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

#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>

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


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Effective JavaScript

Effective JavaScript

David Herman / Addison-Wesley Professional / 2012-12-6 / USD 39.99

"It's uncommon to have a programming language wonk who can speak in such comfortable and friendly language as David does. His walk through the syntax and semantics of JavaScript is both charming and h......一起来看看 《Effective JavaScript》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具