fo40225 / tensorflow-windows-wheel

Tensorflow prebuilt binary for Windows
3.67k stars 1.53k forks source link

LNK2001: 无法解析的外部符号 #147

Closed JaosonMa closed 4 years ago

JaosonMa commented 4 years ago

use libtensorflow-cpu-windows-x86_32-1.8.0-sse2

int node_size = graphdef.node_size(); cout << "node_size: " << node_size << endl; for (int i = 0; i < node_size; i++) { NodeDef node = graphdef.mutable_node(i); } i want print all the nodes in the graphdef, but when i add the code `NodeDef node = graphdef.mutable_node(i);` error comes image

严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK1120 4 个无法解析的外部命令 tensorflow_test E:\c+-project\Demo\tensorflow_test\Release\tensorflow_test.exe 1
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2001 无法解析的外部符号 "public: class google::protobuf::internal::LogMessage & thiscall google::protobuf::internal::LogMessage::operator<<(char const *)" (??6LogMessage@internal@protobuf@google@@QAEAAV0123@PBD@Z) tensorflow_test E:\c+-project\Demo\tensorflow_test\tensorflow_test\目标检测测试.obj 1
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2001 无法解析的外部符号 "public: void __thiscall google::protobuf::internal::LogFinisher::operator=(class google::protobuf::internal::LogMessage &)" (??4LogFinisher@internal@protobuf@google@@QAEXAAVLogMessage@123@@Z) tensorflow_test E:\c+-project\Demo\tensorflow_test\tensorflow_test\目标检测测试.obj 1 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2001 无法解析的外部符号 "public:
thiscall google::protobuf::internal::LogMessage::LogMessage(enum google::protobuf::LogLevel,char const *,int)" (??0LogMessage@internal@protobuf@google@@QAE@W4LogLevel@23@PBDH@Z) tensorflow_test E:\c+-project\Demo\tensorflow_test\tensorflow_test\目标检测测试.obj 1 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2001 无法解析的外部符号 "public: __thiscall google::protobuf::internal::LogMessage::~LogMessage(void)" (??1LogMessage@internal@protobuf@google@@QAE@XZ) tensorflow_test E:\c+-project\Demo\tensorflow_test\tensorflow_test\目标检测测试.obj 1

i google this , i saw one blog https://blog.csdn.net/sun007700/article/details/100832118 need libprotobuf.lib ? was it right ? @fo40225

JaosonMa commented 4 years ago

or please tell me the protobuf version ,i can cmake it myself

JaosonMa commented 4 years ago

i download the https://github.com/protocolbuffers/protobuf/releases/tag/v3.4.1 cmake the dll , it can work image