Open guyue5 opened 3 years ago
I use tf1.14 cpp my code
tensorflow::SessionOptions sess_options; tensorflow::RunOptions run_options; tensorflow::SavedModelBundle bundle; Status status_create = LoadSavedModel(sess_options, run_options, model_path, { tensorflow::kSavedModelTagServe }, &bundle);
1>tf1_14.obj : error LNK2001: 无法解析的外部符号 "class tensorflow::Status __cdecl tensorflow::LoadSavedModel(struct tensorflow::SessionOptions const &,class tensorflow::RunOptions const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::unordered_set<class std::basic_string<char,struct std::char_traits,class std::allocator >,struct std::hash<class std::basic_string<char,struct std::char_traits,class std::allocator > >,struct std::equal_to<class std::basic_string<char,struct std::char_traits,class std::allocator > >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,struct tensorflow::SavedModelBundle * const)" (?LoadSavedModel@tensorflow@@YA?AVStatus@1@AEBUSessionOptions@1@AEBVRunOptions@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$unordered_set@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$hash@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@U?$equal_to@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@6@QEAUSavedModelBundle@1@@Z) 1>tf1_14.obj : error LNK2001: 无法解析的外部符号 "public: __cdecl tensorflow::SessionOptions::SessionOptions(void)" (??0SessionOptions@tensorflow@@QEAA@XZ) 1>D:\shutian_c\cinfer\tf1_14\x64\Release\tf1_14.exe : fatal error LNK1120: 2 个无法解析的外部命令
I use tf1.14 cpp my code
1>tf1_14.obj : error LNK2001: 无法解析的外部符号 "class tensorflow::Status __cdecl tensorflow::LoadSavedModel(struct tensorflow::SessionOptions const &,class tensorflow::RunOptions const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::unordered_set<class std::basic_string<char,struct std::char_traits,class std::allocator >,struct std::hash<class std::basic_string<char,struct std::char_traits,class std::allocator > >,struct std::equal_to<class std::basic_string<char,struct std::char_traits,class std::allocator > >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,struct tensorflow::SavedModelBundle * const)" (?LoadSavedModel@tensorflow@@YA?AVStatus@1@AEBUSessionOptions@1@AEBVRunOptions@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$unordered_set@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$hash@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@U?$equal_to@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@6@QEAUSavedModelBundle@1@@Z)
1>tf1_14.obj : error LNK2001: 无法解析的外部符号 "public: __cdecl tensorflow::SessionOptions::SessionOptions(void)" (??0SessionOptions@tensorflow@@QEAA@XZ)
1>D:\shutian_c\cinfer\tf1_14\x64\Release\tf1_14.exe : fatal error LNK1120: 2 个无法解析的外部命令