zerollzeng / tensorrt-zoo

openpose, yolov3 with tiny-tensorrt
86 stars 25 forks source link

编译时候报错 #28

Closed duoduo1018 closed 4 years ago

duoduo1018 commented 4 years ago

严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::CreateEngine(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 &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<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 &,class std::vector<class std::vector<float,class std::allocator >,class std::allocator<class std::vector<float,class std::allocator > > > const &,int,int)" (?CreateEngine@Trt@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@3@AEBV?$vector@V?$vector@MV?$allocator@M@std@@@std@@V?$allocator@V?$vector@MV?$allocator@M@std@@@std@@@2@@3@HH@Z),该符号在函数 "public: cdecl OpenPose::OpenPose(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 &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<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 &,class std::vector<class std::vector<float,class std::allocator >,class std::allocator<class std::vector<float,class std::allocator > > > const &,int,int)" (??0OpenPose@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@AEBV?$vector@V?$vector@MV?$allocator@M@std@@@std@@V?$allocator@V?$vector@MV?$allocator@M@std@@@std@@@2@@2@HH@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: cdecl Trt::Trt(void)" (??0Trt@@QEAA@XZ),该符号在函数 "public: cdecl OpenPose::OpenPose(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 &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<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 &,class std::vector<class std::vector<float,class std::allocator >,class std::allocator<class std::vector<float,class std::allocator > > > const &,int,int)" (??0OpenPose@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@AEBV?$vector@V?$vector@MV?$allocator@M@std@@@std@@V?$allocator@V?$vector@MV?$allocator@M@std@@@std@@@2@@2@HH@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: cdecl Trt::~Trt(void)" (??1Trt@@QEAA@XZ),该符号在函数 "public: cdecl OpenPose::~OpenPose(void)" (??1OpenPose@@QEAA@XZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::Forward(void)" (?Forward@Trt@@QEAAXXZ),该符号在函数 "public: void cdecl OpenPose::DoInference(class std::vector<float,class std::allocator > &,class std::vector<float,class std::allocator > &)" (?DoInference@OpenPose@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@0@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::CopyFromHostToDevice(class std::vector<float,class std::allocator > const &,int)" (?CopyFromHostToDevice@Trt@@QEAAXAEBV?$vector@MV?$allocator@M@std@@@std@@H@Z),该符号在函数 "public: void cdecl OpenPose::DoInference(class std::vector<float,class std::allocator > &,class std::vector<float,class std::allocator > &)" (?DoInference@OpenPose@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@0@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::CopyFromDeviceToHost(class std::vector<float,class std::allocator > &,int)" (?CopyFromDeviceToHost@Trt@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@H@Z),该符号在函数 "public: void cdecl OpenPose::DoInference(class std::vector<float,class std::allocator > &,class std::vector<float,class std::allocator > &)" (?DoInference@OpenPose@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@0@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: int cdecl Trt::GetMaxBatchSize(void)const " (?GetMaxBatchSize@Trt@@QEBAHXZ),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: void * cdecl Trt::GetBindingPtr(int)const " (?GetBindingPtr@Trt@@QEBAPEAXH@Z),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: unsigned int64 cdecl Trt::GetBindingSize(int)const " (?GetBindingSize@Trt@@QEBA_KH@Z),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: class nvinfer1::Dims
cdecl Trt::GetBindingDims(int)const " (?GetBindingDims@Trt@@QEBA?AVDims@nvinfer1@@H@Z),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK2019 无法解析的外部符号 "public: enum nvinfer1::DataType
cdecl Trt::GetBindingDataType(int)const " (?GetBindingDataType@Trt@@QEBA?AW4DataType@nvinfer1@@H@Z),该符号在函数 "private: void __cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1
错误 LNK1120 11 个无法解析的外部命令 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\bin\Release\testopenpose.exe 1


git clone --recursive https://github.com/zerollzeng/tensorrt-zoo.git cmake3.28.2 win10 x64 (1)能正常生成tinytrt.lib。 (2)testopenpose项目中: 附加包含目录 添加: E:\other_frame\TensorRT\tensorrt-zoo_1\tiny-tensorrt 附加依赖项 添加:..\tiny-tensorrt\Release\tinytrt.lib

怎样修改呢? 是设置错了吗

zerollzeng commented 4 years ago

抱歉这个无法帮到你,我不熟悉windows平台

zhanghongyong123456 commented 3 years ago

严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::CreateEngine(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 &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<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 &,class std::vector<class std::vector<float,class std::allocator >,class std::allocator<class std::vector<float,class std::allocator > > > const &,int,int)" (?CreateEngine@Trt@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@00AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@3@AEBV?$vector@V?$vector@MV?$allocator@M@std@@@std@@v?$allocator@V?$vector@MV?$allocator@M@std@@@std@@@2@@3@HH@Z),该符号在函数 "public: cdecl OpenPose::OpenPose(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 &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<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 &,class std::vector<class std::vector<float,class std::allocator >,class std::allocator<class std::vector<float,class std::allocator > > > const &,int,int)" (??0OpenPose@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@00AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@2@AEBV?$vector@V?$vector@MV?$allocator@M@std@@@std@@v?$allocator@V?$vector@MV?$allocator@M@std@@@std@@@2@@2@HH@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: cdecl Trt::Trt(void)" (??0Trt@@QEAA@XZ),该符号在函数 "public: cdecl OpenPose::OpenPose(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 &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<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 &,class std::vector<class std::vector<float,class std::allocator >,class std::allocator<class std::vector<float,class std::allocator > > > const &,int,int)" (??0OpenPose@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@00AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@2@AEBV?$vector@V?$vector@MV?$allocator@M@std@@@std@@v?$allocator@V?$vector@MV?$allocator@M@std@@@std@@@2@@2@HH@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: cdecl Trt::~Trt(void)" (??1Trt@@QEAA@XZ),该符号在函数 "public: cdecl OpenPose::~OpenPose(void)" (??1OpenPose@@QEAA@XZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::Forward(void)" (?Forward@Trt@@QEAAXXZ),该符号在函数 "public: void cdecl OpenPose::DoInference(class std::vector<float,class std::allocator > &,class std::vector<float,class std::allocator > &)" (?DoInference@OpenPose@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@0@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::CopyFromHostToDevice(class std::vector<float,class std::allocator > const &,int)" (?CopyFromHostToDevice@Trt@@QEAAXAEBV?$vector@MV?$allocator@M@std@@@std@@h@Z),该符号在函数 "public: void cdecl OpenPose::DoInference(class std::vector<float,class std::allocator > &,class std::vector<float,class std::allocator > &)" (?DoInference@OpenPose@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@0@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: void cdecl Trt::CopyFromDeviceToHost(class std::vector<float,class std::allocator > &,int)" (?CopyFromDeviceToHost@Trt@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@h@Z),该符号在函数 "public: void cdecl OpenPose::DoInference(class std::vector<float,class std::allocator > &,class std::vector<float,class std::allocator > &)" (?DoInference@OpenPose@@QEAAXAEAV?$vector@MV?$allocator@M@std@@@std@@0@Z) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: int cdecl Trt::GetMaxBatchSize(void)const " (?GetMaxBatchSize@Trt@@QEBAHXZ),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: void * cdecl Trt::GetBindingPtr(int)const " (?GetBindingPtr@Trt@@QEBAPEAXH@Z),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: unsigned int64 cdecl Trt::GetBindingSize(int)const " (?GetBindingSize@Trt@@QEBA_KH@Z),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: class nvinfer1::Dims cdecl Trt::GetBindingDims(int)const " (?GetBindingDims@Trt@@qeba?AVDims@nvinfer1@@h@Z),该符号在函数 "private: void cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK2019 无法解析的外部符号 "public: enum nvinfer1::DataType cdecl Trt::GetBindingDataType(int)const " (?GetBindingDataType@Trt@@qeba?AW4DataType@nvinfer1@@h@Z),该符号在函数 "private: void __cdecl OpenPose::MallocExtraMemory(void)" (?MallocExtraMemory@OpenPose@@AEAAXXZ) 中被引用 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\build_vs2017_x64\openpose\testopenpose_generated_OpenPose.cu.obj 1 错误 LNK1120 11 个无法解析的外部命令 testopenpose E:\other_frame\TensorRT\tensorrt-zoo_1\bin\Release\testopenpose.exe 1

git clone --recursive https://github.com/zerollzeng/tensorrt-zoo.git cmake3.28.2 win10 x64 (1)能正常生成tinytrt.lib。 (2)testopenpose项目中: 附加包含目录 添加: E:\other_frame\TensorRT\tensorrt-zoo_1\tiny-tensorrt 附加依赖项 添加:..\tiny-tensorrt\Release\tinytrt.lib

怎样修改呢? 是设置错了吗

您好,我也想在windows下配置这个项目,但是我对于cmake不是太熟悉,您能方便讲一下配置流程,以及需要设置的参数吗,谢谢您,期待您的回复