# building project "opencv_dnn.vcxproj" -- FAILED

when I build opencv in Windows enviroment, I got a failed message. The detail of build log can be seen in linked url. many thanks ! I have wasted many time on this error.

System information (version)
  • OpenCV => 4.4
  • opencv_contrib => 4.4.0
  • Operating System / Platform => Windows 10 64 Bit
  • Compiler => Visual Studio 2017
  • Cmake Version => 3.22.1
  • CUDA => 10.1
  • CUDNN => 8.1.1

all_build_log.txt

build_error.txt

cmake log:

cmake_log.txt

part of the build error as follows :

50>graph.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::Skip(int)" (__imp_?Skip@CodedInputStream@io@protobuf@google@@QEAA_NH@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::Skip(int)" (__imp_?Skip@CodedInputStream@io@protobuf@google@@QEAA_NH@Z)
50>opencv-caffe.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::Skip(int)" (__imp_?Skip@CodedInputStream@io@protobuf@google@@QEAA_NH@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::Skip(int)" (__imp_?Skip@CodedInputStream@io@protobuf@google@@QEAA_NH@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::Skip(int)" (__imp_?Skip@CodedInputStream@io@protobuf@google@@QEAA_NH@Z)
50>function.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::Skip(int)" (__imp_?Skip@CodedInputStream@io@protobuf@google@@QEAA_NH@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint64(unsigned __int64 *)" (__imp_?ReadVarint64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
50>tensor_shape.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint64(unsigned __int64 *)" (__imp_?ReadVarint64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
50>opencv-caffe.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint64(unsigned __int64 *)" (__imp_?ReadVarint64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint64(unsigned __int64 *)" (__imp_?ReadVarint64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint64(unsigned __int64 *)" (__imp_?ReadVarint64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
50>op_def.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint64(unsigned __int64 *)" (__imp_?ReadVarint64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
50>graph.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int *)" (__imp_?ReadVarintSizeAsInt@CodedInputStream@io@protobuf@google@@QEAA_NPEAH@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int *)" (__imp_?ReadVarintSizeAsInt@CodedInputStream@io@protobuf@google@@QEAA_NPEAH@Z)
50>versions.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int *)" (__imp_?ReadVarintSizeAsInt@CodedInputStream@io@protobuf@google@@QEAA_NPEAH@Z)
50>opencv-caffe.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int *)" (__imp_?ReadVarintSizeAsInt@CodedInputStream@io@protobuf@google@@QEAA_NPEAH@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int *)" (__imp_?ReadVarintSizeAsInt@CodedInputStream@io@protobuf@google@@QEAA_NPEAH@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int *)" (__imp_?ReadVarintSizeAsInt@CodedInputStream@io@protobuf@google@@QEAA_NPEAH@Z)
50>function.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int *)" (__imp_?ReadVarintSizeAsInt@CodedInputStream@io@protobuf@google@@QEAA_NPEAH@Z)
50>versions.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>graph.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>op_def.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>tensor_shape.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>opencv-caffe.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>function.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (__imp_?ReadTagWithCutoffNoLastTag@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
50>graph.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
50>versions.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
50>opencv-caffe.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
50>function.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned char const * __cdecl google::protobuf::io::CodedInputStream::ExpectTagFromArray(unsigned char const *,unsigned int)" (__imp_?ExpectTagFromArray@CodedInputStream@io@protobuf@google@@SAPEBEPEBEI@Z) referenced in function "private: static bool __cdecl google::protobuf::internal::WireFormatLite::ReadRepeatedFixedSizePrimitive<float,2>(int,unsigned int,class google::protobuf::io::CodedInputStream *,class google::protobuf::RepeatedField<float> *)" (??$ReadRepeatedFixedSizePrimitive@M$01@WireFormatLite@internal@protobuf@google@@CA_NHIPEAVCodedInputStream@io@23@PEAV?$RepeatedField@M@23@@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char const * __cdecl google::protobuf::io::CodedInputStream::ExpectTagFromArray(unsigned char const *,unsigned int)" (__imp_?ExpectTagFromArray@CodedInputStream@io@protobuf@google@@SAPEBEPEBEI@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char const * __cdecl google::protobuf::io::CodedInputStream::ExpectTagFromArray(unsigned char const *,unsigned int)" (__imp_?ExpectTagFromArray@CodedInputStream@io@protobuf@google@@SAPEBEPEBEI@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char const * __cdecl google::protobuf::io::CodedInputStream::ExpectTagFromArray(unsigned char const *,unsigned int)" (__imp_?ExpectTagFromArray@CodedInputStream@io@protobuf@google@@SAPEBEPEBEI@Z)
50>graph.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>op_def.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>tensor_shape.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>opencv-caffe.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>function.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::Swap(struct google::protobuf::internal::ArenaStringPtr *)" (__imp_?Swap@ArenaStringPtr@internal@protobuf@google@@QEAAXPEAU1234@@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::AssignWithDefault(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *,struct google::protobuf::internal::ArenaStringPtr)" (__imp_?AssignWithDefault@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U1234@@Z) referenced in function "public: __cdecl opencv_caffe::BlobProto::BlobProto(class opencv_caffe::BlobProto const &)" (??0BlobProto@opencv_caffe@@QEAA@AEBV01@@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::AssignWithDefault(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *,struct google::protobuf::internal::ArenaStringPtr)" (__imp_?AssignWithDefault@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U1234@@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > * __cdecl google::protobuf::internal::ArenaStringPtr::MutableNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?MutableNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV56@@Z) referenced in function "public: virtual bool __cdecl opencv_caffe::BlobProto::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream@BlobProto@opencv_caffe@@UEAA_NPEAVCodedInputStream@io@protobuf@google@@@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > * __cdecl google::protobuf::internal::ArenaStringPtr::MutableNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?MutableNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV56@@Z)
50>graph.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>op_def.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>tensor_shape.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>opencv-caffe.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>attr_value.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>function.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::ArenaStringPtr::DestroyNoArena(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *)" (__imp_?DestroyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteInt64NoTagToArray(class google::protobuf::RepeatedField<__int64> const &,unsigned char *)" (__imp_?WriteInt64NoTagToArray@WireFormatLite@internal@protobuf@google@@SAPEAEAEBV?$RepeatedField@_J@34@PEAE@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteDoubleNoTagToArray(class google::protobuf::RepeatedField<double> const &,unsigned char *)" (__imp_?WriteDoubleNoTagToArray@WireFormatLite@internal@protobuf@google@@SAPEAEAEBV?$RepeatedField@N@34@PEAE@Z)
50>tensor.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteDoubleNoTagToArray(class google::protobuf::RepeatedField<double> const &,unsigned char *)" (__imp_?WriteDoubleNoTagToArray@WireFormatLite@internal@protobuf@google@@SAPEAEAEBV?$RepeatedField@N@34@PEAE@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(int,class google::protobuf::RepeatedField<unsigned int> const &,unsigned char *)" (__imp_?WriteUInt32ToArray@WireFormatLite@internal@protobuf@google@@SAPEAEHAEBV?$RepeatedField@I@34@PEAE@Z) referenced in function "public: virtual unsigned char * __cdecl opencv_caffe::ConvolutionParameter::InternalSerializeWithCachedSizesToArray(bool,unsigned char *)const " (?InternalSerializeWithCachedSizesToArray@ConvolutionParameter@opencv_caffe@@UEBAPEAE_NPEAE@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteFloatToArray(int,class google::protobuf::RepeatedField<float> const &,unsigned char *)" (__imp_?WriteFloatToArray@WireFormatLite@internal@protobuf@google@@SAPEAEHAEBV?$RepeatedField@M@34@PEAE@Z) referenced in function "public: virtual unsigned char * __cdecl opencv_caffe::Datum::InternalSerializeWithCachedSizesToArray(bool,unsigned char *)const " (?InternalSerializeWithCachedSizesToArray@Datum@opencv_caffe@@UEBAPEAE_NPEAE@Z)
50>opencv-onnx.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteFloatToArray(int,class google::protobuf::RepeatedField<float> const &,unsigned char *)" (__imp_?WriteFloatToArray@WireFormatLite@internal@protobuf@google@@SAPEAEHAEBV?$RepeatedField@M@34@PEAE@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteBoolToArray(int,class google::protobuf::RepeatedField<bool> const &,unsigned char *)" (__imp_?WriteBoolToArray@WireFormatLite@internal@protobuf@google@@SAPEAEHAEBV?$RepeatedField@_N@34@PEAE@Z) referenced in function "public: virtual unsigned char * __cdecl opencv_caffe::LayerParameter::InternalSerializeWithCachedSizesToArray(bool,unsigned char *)const " (?InternalSerializeWithCachedSizesToArray@LayerParameter@opencv_caffe@@UEBAPEAE_NPEAE@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteEnumToArray(int,class google::protobuf::RepeatedField<int> const &,unsigned char *)" (__imp_?WriteEnumToArray@WireFormatLite@internal@protobuf@google@@SAPEAEHAEBV?$RepeatedField@H@34@PEAE@Z) referenced in function "public: virtual unsigned char * __cdecl opencv_caffe::V1LayerParameter::InternalSerializeWithCachedSizesToArray(bool,unsigned char *)const " (?InternalSerializeWithCachedSizesToArray@V1LayerParameter@opencv_caffe@@UEBAPEAE_NPEAE@Z)
50>opencv-caffe.pb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned __int64 __cdecl google::protobuf::internal::WireFormatLite::UInt32Size(unsigned int)" (__imp_?UInt32Size@WireFormatLite@internal@protobuf@google@@SA_KI@Z) referenced in function "public: virtual unsigned __int64 __cdecl opencv_caffe::AccuracyParameter::ByteSizeLong(void)const " (?ByteSizeLong@AccuracyParameter@opencv_caffe@@UEBA_KXZ)
50>pooling_layer.obj : error LNK2001: unresolved external symbol cudnnCreateTensorTransformDescriptor
50>convolution_layer.obj : error LNK2019: unresolved external symbol cudnnSetTensorTransformDescriptor referenced in function "private: void __cdecl cv::dnn::cuda4dnn::csl::cudnn::TensorTransformDescriptor::constructor<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > >(class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > const &,class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > const &)" (??$constructor@V?$vector@_KV?$allocator@_K@std@@@std@@@TensorTransformDescriptor@cudnn@csl@cuda4dnn@dnn@cv@@AEAAXAEBV?$vector@_KV?$allocator@_K@std@@@std@@0@Z)
50>pooling_layer.obj : error LNK2001: unresolved external symbol cudnnSetTensorTransformDescriptor
50>convolution_layer.obj : error LNK2019: unresolved external symbol cudnnDestroyTensorTransformDescriptor referenced in function __catch$??$constructor@V?$vector@_KV?$allocator@_K@std@@@std@@@TensorTransformDescriptor@cudnn@csl@cuda4dnn@dnn@cv@@AEAAXAEBV?$vector@_KV?$allocator@_K@std@@@std@@0@Z$0
50>pooling_layer.obj : error LNK2001: unresolved external symbol cudnnDestroyTensorTransformDescriptor
50>convolution_layer.obj : error LNK2019: unresolved external symbol cudnnTransformTensorEx referenced in function "void __cdecl cv::dnn::cuda4dnn::csl::cudnn::transform<float>(class cv::dnn::cuda4dnn::csl::cudnn::Handle const &,class cv::dnn::cuda4dnn::csl::cudnn::TensorTransformDescriptor const &,class cv::dnn::cuda4dnn::csl::cudnn::TensorDescriptor<float> const &,class cv::dnn::cuda4dnn::csl::DevicePtr<float const >,class cv::dnn::cuda4dnn::csl::cudnn::TensorDescriptor<float> const &,class cv::dnn::cuda4dnn::csl::DevicePtr<float>)" (??$transform@M@cudnn@csl@cuda4dnn@dnn@cv@@YAXAEBVHandle@01234@AEBVTensorTransformDescriptor@01234@AEBV?$TensorDescriptor@M@01234@V?$DevicePtr@$$CBM@1234@2V?$DevicePtr@M@1234@@Z)
50>pooling_layer.obj : error LNK2001: unresolved external symbol cudnnTransformTensorEx
50>tf_graph_simplifier.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > 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) referenced in function "void __cdecl cv::dnn::dnn4_v20200609::simplifySubgraphs(class opencv_tensorflow::GraphDef &)" (?simplifySubgraphs@dnn4_v20200609@dnn@cv@@YAXAEAVGraphDef@opencv_tensorflow@@@Z)
50>tf_importer.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > 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)
50>tf_graph_simplifier.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > * __cdecl google::protobuf::internal::ArenaStringPtr::Release(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const *,class google::protobuf::Arena *)" (__imp_?Release@ArenaStringPtr@internal@protobuf@google@@QEAAPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV56@PEAVArena@34@@Z) referenced in function "void __cdecl cv::dnn::dnn4_v20200609::releaseTensor(class opencv_tensorflow::TensorProto *)" (?releaseTensor@dnn4_v20200609@dnn@cv@@YAXPEAVTensorProto@opencv_tensorflow@@@Z)
50>tf_graph_simplifier.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::SwapElements(int,int)" (__imp_?SwapElements@RepeatedPtrFieldBase@internal@protobuf@google@@IEAAXHH@Z) referenced in function "void __cdecl cv::dnn::dnn4_v20200609::permute(class google::protobuf::RepeatedPtrField<class opencv_tensorflow::NodeDef> *,class std::vector<int,class std::allocator<int> > const &)" (?permute@dnn4_v20200609@dnn@cv@@YAXPEAV?$RepeatedPtrField@VNodeDef@opencv_tensorflow@@@protobuf@google@@AEBV?$vector@HV?$allocator@H@std@@@std@@@Z)
50>tf_importer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl google::protobuf::MessageLite::ByteSize(void)const " (__imp_?ByteSize@MessageLite@protobuf@google@@QEBAHXZ) referenced in function "public: void __cdecl cv::dnn::dnn4_v20200609::`anonymous namespace'::TFImporter::populateNet(class cv::dnn::dnn4_v20200609::Net)" (?populateNet@TFImporter@?A0xc4582848@dnn4_v20200609@dnn@cv@@QEAAXVNet@345@@Z)
50>D:\dev-env\open-cv-cuda\cuda-build\bin\Release\opencv_dnn440.dll : fatal error LNK1120: 59 unresolved externals
50>Done building project "opencv_dnn.vcxproj" -- FAILED.

outdated version. invalid bug report.

I have compiled once more using latest version: opencv 4.x, opencv contrib 4.x, but in build process, I got error as follows:

50>convolution_layer.cpp.obj : error LNK2019: unresolved external symbol cudnnCreateTensorTransformDescriptor referenced in function "private: void __cdecl cv::dnn::cuda4dnn::csl::cudnn::TensorTransformDescriptor::constructor<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > >(class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > const &,class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > const &)" (??$constructor@V?$vector@_KV?$allocator@_K@std@@@std@@@TensorTransformDescriptor@cudnn@csl@cuda4dnn@dnn@cv@@AEAAXAEBV?$vector@_KV?$allocator@_K@std@@@std@@0@Z)
50>pooling_layer.cpp.obj : error LNK2001: unresolved external symbol cudnnCreateTensorTransformDescriptor
50>convolution_layer.cpp.obj : error LNK2019: unresolved external symbol cudnnSetTensorTransformDescriptor referenced in function "private: void __cdecl cv::dnn::cuda4dnn::csl::cudnn::TensorTransformDescriptor::constructor<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > >(class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > const &,class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > const &)" (??$constructor@V?$vector@_KV?$allocator@_K@std@@@std@@@TensorTransformDescriptor@cudnn@csl@cuda4dnn@dnn@cv@@AEAAXAEBV?$vector@_KV?$allocator@_K@std@@@std@@0@Z)
50>pooling_layer.cpp.obj : error LNK2001: unresolved external symbol cudnnSetTensorTransformDescriptor
50>convolution_layer.cpp.obj : error LNK2019: unresolved external symbol cudnnDestroyTensorTransformDescriptor referenced in function __catch$??$constructor@V?$vector@_KV?$allocator@_K@std@@@std@@@TensorTransformDescriptor@cudnn@csl@cuda4dnn@dnn@cv@@AEAAXAEBV?$vector@_KV?$allocator@_K@std@@@std@@0@Z$0
50>pooling_layer.cpp.obj : error LNK2001: unresolved external symbol cudnnDestroyTensorTransformDescriptor
50>convolution_layer.cpp.obj : error LNK2019: unresolved external symbol cudnnTransformTensorEx referenced in function "void __cdecl cv::dnn::cuda4dnn::csl::cudnn::transform<float>(class cv::dnn::cuda4dnn::csl::cudnn::Handle const &,class cv::dnn::cuda4dnn::csl::cudnn::TensorTransformDescriptor const &,class cv::dnn::cuda4dnn::csl::cudnn::TensorDescriptor<float> const &,class cv::dnn::cuda4dnn::csl::DevicePtr<float const >,class cv::dnn::cuda4dnn::csl::cudnn::TensorDescriptor<float> const &,class cv::dnn::cuda4dnn::csl::DevicePtr<float>)" (??$transform@M@cudnn@csl@cuda4dnn@dnn@cv@@YAXAEBVHandle@01234@AEBVTensorTransformDescriptor@01234@AEBV?$TensorDescriptor@M@01234@V?$DevicePtr@$$CBM@1234@2V?$DevicePtr@M@1234@@Z)
50>pooling_layer.cpp.obj : error LNK2001: unresolved external symbol cudnnTransformTensorEx
50>D:\dev-env\open-cv-cuda\cuda-build-x\bin\Release\opencv_dnn454.dll : fatal error LNK1120: 4 unresolved externals

can you give some solution? thanks a lot.

My cuda configuration is :

--
-- General configuration for OpenCV 4.5.5-dev =====================================
--   Version control:               4.5.2-1068-g80c2fefc43
--
--   Extra modules:
--     Location (extra):            G:/Lib/opencv_contrib/modules
--     Version control (extra):     4.5.1-265-g758c1a9b
--
--   Platform:
--     Timestamp:                   2021-12-21T17:14:27Z
--     Host:                        Windows 10.0.19043 AMD64
--     CMake:                       3.18.4
--     CMake generator:             Visual Studio 15 2017 Win64
--     CMake build tool:            C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe
--     MSVC:                        1916
--     Configuration:               Debug Release
--
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (18 files):         + SSSE3 SSE4_1
--       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (33 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe  (ver 19.16.27045.0)
--     C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MD /O2 /Ob2 /DNDEBUG
--     C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MDd /Zi /Ob0 /Od /RTC1
--     C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
--     C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP   /MD /O2 /Ob2 /DNDEBUG
--     C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP /MDd /Zi /Ob0 /Od /RTC1
--     Linker flags (Release):      /machine:x64  /INCREMENTAL:NO
--     Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:          cudart_static.lib nppc.lib nppial.lib nppicc.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cudnn.lib cufft.lib -LIBPATH:F:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64
--     3rdparty dependencies:
--
--   OpenCV modules:
--     To be built:                 alphamat aruco barcode bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg saliency sfm shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab viz wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    rgbd world
--     Disabled by dependency:      -
--     Unavailable:                 cvv freetype hdf java julia matlab ovis python2
--     Applications:                tests examples apps
--     Documentation:               doxygen python
--     Non-free algorithms:         YES
--
--   Windows RT support:            NO
--
--   GUI:                           WIN32UI
--     Win32 UI:                    YES
--     OpenGL support:              YES (opengl32 glu32)
--     VTK support:                 YES (ver 9.0.20210122)
--
--   Media I/O:
--     ZLib:                        optimized G:/lib/install/zlib/lib/zlibstatic.lib debug G:/lib/install/zlib/lib/zlibstaticd.lib (ver 1.2.11)
--     JPEG:                        build-libjpeg-turbo (ver 2.1.2-62)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         optimized G:/lib/install/libpng/lib/libpng16_static.lib debug G:/lib/install/libpng/lib/libpng16_staticd.lib (ver 1.6.36)
--     TIFF:                        build (ver 42 - 4.2.0)
--     JPEG 2000:                   build (ver 2.4.0)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      YES (prebuilt binaries)
--       avcodec:                   YES (58.134.100)
--       avformat:                  YES (58.76.100)
--       avutil:                    YES (56.70.100)
--       swscale:                   YES (5.9.100)
--       avresample:                YES (4.0.0)
--     GStreamer:                   NO
--     DirectShow:                  YES
--     Media Foundation:            YES
--       DXVA:                      YES
--
--   Parallel framework:            Concurrency
--
--   Other third-party libraries:
--     Intel IPP:                   2020.0.0 Gold [2020.0.0]
--            at:                   G:/Lib/build/opencv/3rdparty/ippicv/ippicv_win/icv
--     Intel IPP IW:                sources (2020.0.0)
--               at:                G:/Lib/build/opencv/3rdparty/ippicv/ippicv_win/iw
--     Lapack:                      NO
--     Eigen:                       YES (ver 3.3.90)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
--
--   NVIDIA CUDA:                   YES (ver 11.2, CUFFT CUBLAS)
--     NVIDIA GPU arch:             86
--     NVIDIA PTX archs:
--
--   cuDNN:                         YES (ver 8.1.1)
--
--   OpenCL:                        YES (NVD3D11)
--     Include path:                G:/Lib/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
--
--   Python 3:
--     Interpreter:                 f:/Program Files/Python/python.exe (ver 3.9.5)
--     Libraries:                   C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/libs/python39.lib (ver 3.9.5)
--     numpy:                       f:/Program Files/Python/lib/site-packages/numpy/core/include (ver 1.21.4)
--     install path:                f:/Program Files/Python/lib/site-packages/cv2/python-3.9
--
--   Python (for build):            f:/Program Files/Python/python.exe
--
--   Java:
--     ant:                         NO
--     JNI:                         C:/Program Files/Java/jdk1.8.0_152/include C:/Program Files/Java/jdk1.8.0_152/include/win32 C:/Program Files/Java/jdk1.8.0_152/include
--     Java wrappers:               NO
--     Java tests:                  NO
--
--   Install to:                    G:/Lib/install/opencv
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: G:/Lib/build/opencv