【发布时间】:2018-05-31 05:57:01
【问题描述】:
很抱歉,我无法清楚地描述问题。 编译器给出的错误是:
D:\download\tensorflow-master\tensorflow-master\tensorflow\contrib\cmake\build\protobuf\src\protobuf\src\google/protobuf/arena.h(883): error C3855: “Eigen::Map”: type parameter 'MapOption' is incompatible with the declaration
D:\download\tensorflow-master\tensorflow-master\tensorflow\contrib\cmake\build\protobuf\src\protobuf\src\google/protobuf/arena.h(883): error C2976: “Eigen::Map”: too few type arguments
错误来自官方的tensorflow代码,我可以运行用C++编写的示例程序。当我尝试将我的 tensorflow 代码插入另一个项目时,出现了错误。
template <typename Key, typename T>
friend class Map;
我知道问题是“地图”指向 Eigen::Map 而它需要指向 google::protobuff::Map。此外,“地图”的声明位于 google::protobuff 命名空间下。 有没有人遇到过同样的问题? 我正在尽力给出明确的声明。非常感谢!
【问题讨论】:
-
我们无法告诉您任何信息,请用英文填写您的错误,并提供minimal reproducible example。
-
猜猜你的头文件或 cpp 文件中是否有
using namespace Eigen在你的一个包含之前? -
然后使用完全限定名称,
Eigen::Map或google::protobuff::Map并忘记using namespace构造
标签: c++ tensorflow eigen3