TensorRT-Alpha FAQ

2023-12-23 21:34:41

1、linux下出现错误:

libyolov8.so: undefined reference to `sample::splitToStringVec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char)'
collect2: error: ld returned 1 exit status
CMakeFiles/app_yolov8.dir/build.make:147: recipe for target 'app_yolov8' failed
make[2]: *** [app_yolov8] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/app_yolov8.dir/all' failed
make[1]: *** [CMakeFiles/app_yolov8.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

原因:仓库默认tensorrt8.4.2.4,你使用了更新版本,如:tensorrt8.6.1.6

解决:修改cmakelist就行,sample::splitToStringVec函数在文件:/samples/common/sampleUtils.cpp,所以这里直接在原来cmakelists中增加这个文件就行,如下图:

重新make编译之后,通过:

文章来源:https://blog.csdn.net/m0_72734364/article/details/135173795
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。