onnx-tensorrt icon indicating copy to clipboard operation
onnx-tensorrt copied to clipboard

how about compile it with VS2019 in windows?

Open xinsuinizhuan opened this issue 3 years ago • 2 comments

I compile it wiht VS2019 in windows: TensorRT-8.2.3.0 protobuf-3.16.0

but so many link errors: 2>main.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl google::protobuf::io::CodedInputStream::CodedInputStream(class google::protobuf::io::ZeroCopyInputStream *)" (_imp??0CodedInputStream@io@protobuf@google@@QEAA@PEAVZeroCopyInputStream@123@@Z),函数 main 中引用了该符号 2>nvonnxparser_static.lib(ModelImporter.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl google::protobuf::io::CodedInputStream::CodedInputStream(class google::protobuf::io::ZeroCopyInputStream *)" (_imp??0CodedInputStream@io@protobuf@google@@QEAA@PEAVZeroCopyInputStream@123@@Z) 2>main.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int,int)" (_imp?SetTotalBytesLimit@CodedInputStream@io@protobuf@google@@QEAAXHH@Z),函数 main 中引用了该符号 2> 已定义且可能匹配的符号上的提示: 2> "__declspec(dllimport) public: void __cdecl google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)" (_imp?SetTotalBytesLimit@CodedInputStream@io@protobuf@google@@QEAAXH@Z) 2>main.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: unsigned char * __cdecl google::protobuf::io::CodedOutputStream::GetDirectBufferForNBytesAndAdvance(int)" (_imp?GetDirectBufferForNBytesAndAdvance@CodedOutputStream@io@protobuf@google@@QEAAPEAEH@Z),函数 main 中引用了该符号 2> 已定义且可能匹配的符号上的提示: 2> "__declspec(dllimport) private: unsigned char * __cdecl google::protobuf::io::EpsCopyOutputStream::GetDirectBufferForNBytesAndAdvance(int,unsigned char * *)" (_imp?GetDirectBufferForNBytesAndAdvance@EpsCopyOutputStream@io@protobuf@google@@AEAAPEAEHPEAPEAE@Z) 2>main.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::io::FileInputStream::SetCloseOnDelete(bool)" (_imp?SetCloseOnDelete@FileInputStream@io@protobuf@google@@QEAAX_N@Z),函数 main 中引用了该符号 2>main.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::io::FileOutputStream::SetCloseOnDelete(bool)" (_imp?SetCloseOnDelete@FileOutputStream@io@protobuf@google@@QEAAX_N@Z),函数 main 中引用了该符号 2>main.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __cdecl google::protobuf::MessageLite::ByteSize(void)const " (_imp?ByteSize@MessageLite@protobuf@google@@QEBAHXZ),函数 main 中引用了该符号 2>main.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::MessageLite::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (_imp?SerializeWithCachedSizes@MessageLite@protobuf@google@@QEBAXPEAVCodedOutputStream@io@23@@Z),函数 main 中引用了该符号 2>nvonnxparser_static.lib(ModelImporter.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>nvonnxparser_static.lib(OnnxAttrs.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>nvonnxparser_static.lib(ConditionalHelpers.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>main.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>onnx.lib(ir_pb_converter.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>nvonnxparser_static.lib(onnx2trt_utils.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>nvonnxparser_static.lib(builtin_op_importers.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::ArenaStringPtr::Get(void)const " (_imp?Get@ArenaStringPtr@internal@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>onnx.lib(ir_pb_converter.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::UnsafeSetDefault(class std::basic_string<char,struct std::char_traits,class std::allocator > const *)" (_imp?UnsafeSetDefault@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),函数 "public: void __cdecl onnx2trt_onnx::TensorShapeProto_Dimension::set_dim_param<class std::basic_string<char,struct std::char_traits,class std::allocator > const &>(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??$set_dim_param@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@$$V@TensorShapeProto_Dimension@onnx2trt_onnx@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::UnsafeSetDefault(class std::basic_string<char,struct std::char_traits,class std::allocator > const *)" (_imp?UnsafeSetDefault@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 2>onnx.lib(ir_pb_converter.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::GetEmptyStringAlreadyInited(void)" (_imp?GetEmptyStringAlreadyInited@internal@protobuf@google@@YAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ),函数 "public: void __cdecl onnx2trt_onnx::TensorShapeProto_Dimension::set_dim_param<class std::basic_string<char,struct std::char_traits,class std::allocator > const &>(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??$set_dim_param@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@$$V@TensorShapeProto_Dimension@onnx2trt_onnx@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中引用了该符号 2>nvonnxparser_static.lib(ModelImporter.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::GetEmptyStringAlreadyInited(void)" (_imp?GetEmptyStringAlreadyInited@internal@protobuf@google@@YAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl google::protobuf::internal::GetEmptyStringAlreadyInited(void)" (_imp?GetEmptyStringAlreadyInited@internal@protobuf@google@@YAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 2>nvonnxparser_static.lib(ModelImporter.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) protected: void * const * __cdecl google::protobuf::internal::RepeatedPtrFieldBase::raw_data(void)const " (_imp?raw_data@RepeatedPtrFieldBase@internal@protobuf@google@@IEBAPEBQEAXXZ),函数 "class onnx2trt::Status __cdecl onnx2trt::parseGraph(class onnx2trt::IImporterContext *,class onnx2trt_onnx::GraphProto const &,bool,int *)" (?parseGraph@onnx2trt@@YA?AVStatus@1@PEAVIImporterContext@1@AEBVGraphProto@onnx2trt_onnx@@_NPEAH@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: unsigned char * __cdecl google::protobuf::io::EpsCopyOutputStream::WriteRaw(void const *,int,unsigned char *)" (_imp?WriteRaw@EpsCopyOutputStream@io@protobuf@google@@QEAAPEAEPEBXHPEAE@Z),函数 "public: virtual unsigned char * __cdecl onnx2trt_onnx::TensorProto::_InternalSerialize(unsigned char *,class google::protobuf::io::EpsCopyOutputStream *)const " (?_InternalSerialize@TensorProto@onnx2trt_onnx@@UEBAPEAEPEAEPEAVEpsCopyOutputStream@io@protobuf@google@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: unsigned char * __cdecl google::protobuf::io::EpsCopyOutputStream::WriteBytesMaybeAliased(unsigned int,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,unsigned char *)" (_imp?WriteBytesMaybeAliased@EpsCopyOutputStream@io@protobuf@google@@QEAAPEAEIAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAE@Z),函数 "public: virtual unsigned char * __cdecl onnx2trt_onnx::TensorProto::_InternalSerialize(unsigned char *,class google::protobuf::io::EpsCopyOutputStream )const " (?_InternalSerialize@TensorProto@onnx2trt_onnx@@UEBAPEAEPEAEPEAVEpsCopyOutputStream@io@protobuf@google@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) private: void * __cdecl google::protobuf::Arena::AllocateInternal(unsigned __int64,unsigned __int64,void (__cdecl)(void *),class type_info const *)" (_imp?AllocateInternal@Arena@protobuf@google@@AEAAPEAX_K0P6AXPEAX@ZPEBVtype_info@@@Z),函数 "private: static class onnx2trt_onnx::AttributeProto * __cdecl google::protobuf::Arena::CreateMaybeMessage<class onnx2trt_onnx::AttributeProto>(class google::protobuf::Arena *)" (??$CreateMaybeMessage@VAttributeProto@onnx2trt_onnx@@$$V@Arena@protobuf@google@@CAPEAVAttributeProto@onnx2trt_onnx@@PEAV012@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl google::protobuf::internal::ArenaStringPtr::ArenaStringPtr(class google::protobuf::internal::ExplicitlyConstructed<class std::basic_string<char,struct std::char_traits,class std::allocator > > const *)" (_imp??0ArenaStringPtr@internal@protobuf@google@@QEAA@PEBV?$ExplicitlyConstructed@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@123@@Z),函数 "public: __cdecl onnx2trt_onnx::TensorProto::TensorProto(struct google::protobuf::internal::ConstantInitialized)" (??0TensorProto@onnx2trt_onnx@@QEAA@UConstantInitialized@internal@protobuf@google@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *,class std::basic_string<char,struct std::char_traits,class std::allocator > const *,class google::protobuf::Arena *)" (_imp?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@PEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVArena@34@@Z),函数 "private: void __cdecl onnx2trt_onnx::AttributeProto::InternalSwap(class onnx2trt_onnx::AttributeProto *)" (?InternalSwap@AttributeProto@onnx2trt_onnx@@AEAAXPEAV12@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)" (_imp?ClearNonDefaultToEmpty@ArenaStringPtr@internal@protobuf@google@@QEAAXXZ),函数 "public: virtual void __cdecl onnx2trt_onnx::ModelProto::Clear(void)" (?Clear@ModelProto@onnx2trt_onnx@@UEAAXXZ) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits,class std::allocator > const *)" (_imp?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),函数 "public: virtual void * __cdecl onnx2trt_onnx::StringStringEntryProto::scalar deleting destructor'(unsigned int)" (??_GStringStringEntryProto@onnx2trt_onnx@@UEAAPEAXI@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) protected: __cdecl google::protobuf::internal::RepeatedPtrFieldBase::~RepeatedPtrFieldBase(void)" (__imp_??1RepeatedPtrFieldBase@internal@protobuf@google@@IEAA@XZ),函数 "int public: __cdecl onnx2trt_onnx::AttributeProto::AttributeProto(class AttributeProto::dtor$10 const &)'::1'::dtor$10" (?dtor$10@?0???0AttributeProto@onnx2trt_onnx@@QEAA@AEBV01@@Z@4HA) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(class google::protobuf::internal::RepeatedPtrFieldBase *)" (__imp_?InternalSwap@RepeatedPtrFieldBase@internal@protobuf@google@@QEAAXPEAV1234@@Z),函数 "private: void __cdecl onnx2trt_onnx::AttributeProto::InternalSwap(class onnx2trt_onnx::AttributeProto *)" (?InternalSwap@AttributeProto@onnx2trt_onnx@@AEAAXPEAV12@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) private: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(class google::protobuf::internal::RepeatedPtrFieldBase const &,void (__cdecl google::protobuf::internal::RepeatedPtrFieldBase::*)(void * *,void * *,int,int))" (__imp_?MergeFromInternal@RepeatedPtrFieldBase@internal@protobuf@google@@AEAAXAEBV1234@P81234@EAAXPEAPEAX1HH@Z@Z),函数 "public: virtual void __cdecl onnx2trt_onnx::TensorShapeProto::CopyFrom(class google::protobuf::Message const &)" (?CopyFrom@TensorShapeProto@onnx2trt_onnx@@UEAAXAEBVMessage@protobuf@google@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::Int32Size(int)" (__imp_?Int32Size@WireFormatLite@internal@protobuf@google@@SA_KH@Z),函数 "public: virtual unsigned __int64 __cdecl onnx2trt_onnx::TensorProto::ByteSizeLong(void)const " (?ByteSizeLong@TensorProto@onnx2trt_onnx@@UEBA_KXZ) 中引用了该符号 2> 已定义且可能匹配的符号上的提示: 2> "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::Int32Size(class google::protobuf::RepeatedField<int> const &)" (__imp_?Int32Size@WireFormatLite@internal@protobuf@google@@SA_KAEBV?$RepeatedField@H@34@@Z) 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::Int64Size(__int64)" (__imp_?Int64Size@WireFormatLite@internal@protobuf@google@@SA_K_J@Z),函数 "public: virtual unsigned __int64 __cdecl onnx2trt_onnx::ModelProto::ByteSizeLong(void)const " (?ByteSizeLong@ModelProto@onnx2trt_onnx@@UEBA_KXZ) 中引用了该符号 2> 已定义且可能匹配的符号上的提示: 2> "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::Int64Size(class google::protobuf::RepeatedField<__int64> const &)" (__imp_?Int64Size@WireFormatLite@internal@protobuf@google@@SA_KAEBV?$RepeatedField@_J@34@@Z) 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::EnumSize(int)" (__imp_?EnumSize@WireFormatLite@internal@protobuf@google@@SA_KH@Z),函数 "public: virtual unsigned __int64 __cdecl onnx2trt_onnx::TensorProto::ByteSizeLong(void)const " (?ByteSizeLong@TensorProto@onnx2trt_onnx@@UEBA_KXZ) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::StringSize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?StringSize@WireFormatLite@internal@protobuf@google@@SA_KAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),函数 "public: virtual unsigned __int64 __cdecl onnx2trt_onnx::ModelProto::ByteSizeLong(void)const " (?ByteSizeLong@ModelProto@onnx2trt_onnx@@UEBA_KXZ) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::BytesSize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?BytesSize@WireFormatLite@internal@protobuf@google@@SA_KAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),函数 "public: virtual unsigned __int64 __cdecl onnx2trt_onnx::TensorProto::ByteSizeLong(void)const " (?ByteSizeLong@TensorProto@onnx2trt_onnx@@UEBA_KXZ) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::LengthDelimitedSize(unsigned __int64)" (__imp_?LengthDelimitedSize@WireFormatLite@internal@protobuf@google@@SA_K_K@Z),函数 "public: virtual unsigned __int64 __cdecl onnx2trt_onnx::ModelProto::ByteSizeLong(void)const " (?ByteSizeLong@ModelProto@onnx2trt_onnx@@UEBA_KXZ) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: bool __cdecl google::protobuf::internal::EpsCopyInputStream::PopLimit(int)" (__imp_?PopLimit@EpsCopyInputStream@internal@protobuf@google@@QEAA_NH@Z),函数 "public: virtual char const * __cdecl onnx2trt_onnx::ModelProto::_InternalParse(char const *,class google::protobuf::internal::ParseContext *)" (?_InternalParse@ModelProto@onnx2trt_onnx@@UEAAPEBDPEBDPEAVParseContext@internal@protobuf@google@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: bool __cdecl google::protobuf::internal::ParseContext::Done(char const * *)" (__imp_?Done@ParseContext@internal@protobuf@google@@QEAA_NPEAPEBD@Z),函数 "public: virtual char const * __cdecl onnx2trt_onnx::ModelProto::_InternalParse(char const *,class google::protobuf::internal::ParseContext *)" (?_InternalParse@ModelProto@onnx2trt_onnx@@UEAAPEBDPEBDPEAVParseContext@internal@protobuf@google@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __cdecl google::protobuf::internal::CachedSize::Get(void)const " (__imp_?Get@CachedSize@internal@protobuf@google@@QEBAHXZ),函数 "public: virtual unsigned char * __cdecl onnx2trt_onnx::ModelProto::_InternalSerialize(unsigned char *,class google::protobuf::io::EpsCopyOutputStream *)const " (?_InternalSerialize@ModelProto@onnx2trt_onnx@@UEBAPEAEPEAEPEAVEpsCopyOutputStream@io@protobuf@google@@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::internal::CachedSize::Set(int)" (__imp_?Set@CachedSize@internal@protobuf@google@@QEAAXH@Z),函数 "public: virtual unsigned __int64 __cdecl onnx2trt_onnx::ModelProto::ByteSizeLong(void)const " (?ByteSizeLong@ModelProto@onnx2trt_onnx@@UEBA_KXZ) 中引用了该符号 2> 已定义且可能匹配的符号上的提示: 2> "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Set(struct google::protobuf::internal::ArenaStringPtr::EmptyDefault,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &&,class google::protobuf::Arena *)" (__imp_?Set@ArenaStringPtr@internal@protobuf@google@@QEAAXUEmptyDefault@1234@$$QEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVArena@34@@Z) 2> "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Set(struct google::protobuf::internal::ArenaStringPtr::EmptyDefault,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class google::protobuf::Arena *)" (__imp_?Set@ArenaStringPtr@internal@protobuf@google@@QEAAXUEmptyDefault@1234@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVArena@34@@Z) 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl google::protobuf::internal::CachedSize::CachedSize(void)" (__imp_??0CachedSize@internal@protobuf@google@@QEAA@XZ),函数 "private: static class onnx2trt_onnx::OperatorSetIdProto * __cdecl google::protobuf::Arena::CreateMaybeMessage<class onnx2trt_onnx::OperatorSetIdProto>(class google::protobuf::Arena *)" (??$CreateMaybeMessage@VOperatorSetIdProto@onnx2trt_onnx@@$$V@Arena@protobuf@google@@CAPEAVOperatorSetIdProto@onnx2trt_onnx@@PEAV012@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl google::protobuf::UnknownFieldSet::UnknownFieldSet(void)" (__imp_??0UnknownFieldSet@protobuf@google@@QEAA@XZ),函数 "private: class google::protobuf::UnknownFieldSet * __cdecl google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<class google::protobuf::UnknownFieldSet>(void)" (??$mutable_unknown_fields_slow@VUnknownFieldSet@protobuf@google@@@InternalMetadata@internal@protobuf@google@@AEAAPEAVUnknownFieldSet@23@XZ) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl google::protobuf::UnknownFieldSet::Swap(class google::protobuf::UnknownFieldSet *)" (__imp_?Swap@UnknownFieldSet@protobuf@google@@QEAAXPEAV123@@Z),函数 "private: void __cdecl google::protobuf::internal::InternalMetadata::DoSwap<class google::protobuf::UnknownFieldSet>(class google::protobuf::UnknownFieldSet *)" (??$DoSwap@VUnknownFieldSet@protobuf@google@@@InternalMetadata@internal@protobuf@google@@AEAAXPEAVUnknownFieldSet@23@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl google::protobuf::Message::Message(void)" (__imp_??0Message@protobuf@google@@QEAA@XZ),函数 "public: __cdecl onnx2trt_onnx::AttributeProto::AttributeProto(class onnx2trt_onnx::AttributeProto const &)" (??0AttributeProto@onnx2trt_onnx@@QEAA@AEBV01@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) protected: __cdecl google::protobuf::Message::Message(class google::protobuf::Arena *)" (__imp_??0Message@protobuf@google@@IEAA@PEAVArena@12@@Z),函数 "private: static class onnx2trt_onnx::OperatorSetIdProto * __cdecl google::protobuf::Arena::CreateMaybeMessage<class onnx2trt_onnx::OperatorSetIdProto>(class google::protobuf::Arena *)" (??$CreateMaybeMessage@VOperatorSetIdProto@onnx2trt_onnx@@$$V@Arena@protobuf@google@@CAPEAVOperatorSetIdProto@onnx2trt_onnx@@PEAV012@@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual __cdecl google::protobuf::Message::~Message(void)" (__imp_??1Message@protobuf@google@@UEAA@XZ),函数 "public: virtual void * __cdecl onnx2trt_onnx::StringStringEntryProto::scalar deleting destructor'(unsigned int)" (??_GStringStringEntryProto@onnx2trt_onnx@@UEAAPEAXI@Z) 中引用了该符号 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2001: 无法解析的外部符号 "public: virtual __cdecl google::protobuf::Message::~Message(void)" (??1Message@protobuf@google@@UEAA@XZ) 2>onnx_proto.lib(onnx_onnx2trt_onnx-ml.pb.obj) : error LNK2001: 无法解析的外部符号 "protected: __cdecl google::protobuf::internal::RepeatedPtrFieldBase::~RepeatedPtrFieldBase(void)" (??1RepeatedPtrFieldBase@internal@protobuf@google@@IEAA@XZ) 2>E:\Item\Item_doing\onnx-tensorrt\onnx-tensorrt\build\Release\onnx2trt.exe : fatal error LNK1120: 39 个无法解析的外部命令 2>已完成生成项目“onnx2trt.vcxproj”的操作 - 失败。

xinsuinizhuan avatar Feb 21 '22 05:02 xinsuinizhuan

We don't officially support the Windows build of this repository, error seems to becoming from Protobuf. What version do you have installed?

kevinch-nv avatar Feb 22 '22 06:02 kevinch-nv

I have test the Protobuf: 图片 but they seem same errors i complie the probuf as the onnx guide: https://github.com/onnx/onnx/tree/994c6181247d7b419b28889fc57d5817e2089419 图片 图片

Could help solved the windows compile. I want convert the onnx to tensorrt in windows。Because the tensorrt model must reconvert it in different gpu card compute, it is a big problem to deployment.

xinsuinizhuan avatar Feb 23 '22 02:02 xinsuinizhuan