-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win10+vs2019 error compile yolov8 #9
Comments
@aiwenzhu 您好。 |
cuda 没装好 cudnn 确定了吗? opencv 自己编译一下 不然 cmake 找不到 |
hi 你好,感谢回复,我测试了cuda11.1和cuda11.6,有cudnn,和带cuda一起编译的opencv,我在vs里把cu文件设置了nvcc编译还是报同样的问题; 1.是否cuda和tensorrt环境必须是cuda11.3,cudnn8.2.0,tensorrt8.4.2.4
opencv_world452.lib;cuda.lib;cudart.lib;nvinfer.lib;nvinfer_plugin.lib;nvonnxparser.lib;nvparsers.lib;cublas.lib;cublasLt.lib;cudadevrt.lib;cudart_static.lib;cudnn.lib;cudnn64_8.lib;cudnn_adv_infer.lib;cudnn_adv_infer64_8.lib;cudnn_adv_train.lib;cudnn_adv_train64_8.lib;cudnn_cnn_infer.lib;cudnn_cnn_infer64_8.lib;cudnn_cnn_train.lib;cudnn_cnn_train64_8.lib;cudnn_ops_infer.lib;cudnn_ops_infer64_8.lib;cudnn_ops_train.lib;cudnn_ops_train64_8.lib;cufft.lib;cufftw.lib;curand.lib;cusolver.lib;cusolverMg.lib;cusparse.lib;nppc.lib;nppial.lib;nppicc.lib;nppidei.lib;nppif.lib;nppig.lib;nppim.lib;nppist.lib;nppisu.lib;nppitc.lib;npps.lib;nvblas.lib;nvjpeg.lib;nvml.lib;nvrtc.lib;OpenCL.lib; 3.我把所有的sample::gLogError << 这种输出的代码注释掉,无法解析的外部符号 "class sample::LogStreamConsumer sample::gLogError"这个错误就没了,难道是缺lib吗,我又找不到更多相关的lib了 4.如果我通过修改cmakeLists.txt的方式,也是报了20几个无法解析的外部符号,common.cmake我的修改如下: cmakeLists.txt修改如下: |
好的,我先学习相关内容,哈哈,等大佬更新 |
@aiwenzhu Win10教程更新了 |
已按照教程运行成功,谢谢 |
环境:cuda11.1 + tensorrt8.4.1.5+vs2019+opencv3.4.6
编译报错:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 "void __cdecl resizeDevice(int const &,float *,int,int,float *,int,int,float,struct utils::AffineMat)" (?resizeDevice@@YAXAEBHPEAMHH1HHMUAffineMat@utils@@@z),函数 "public: virtual void __cdecl YOLOV8::preprocess(class std::vector<class cv::Mat,class std::allocator > const &)" (?preprocess@YOLOV8@@UEAAXAEBV?$vector@VMat@cv@@v?$allocator@VMat@cv@@@std@@@std@@@z) 中引用了该符号 tensorrt-alpha-yolov8 E:\Vs_Projects_2023\tensorrt-alpha-yolov8\tensorrt-alpha-yolov8\yolov8.obj 1
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 "void __cdecl hwc2chwDevice(int const &,float *,int,int,float *,int,int)" (?hwc2chwDevice@@YAXAEBHPEAMHH1HH@Z),函数 "public: virtual void __cdecl YOLOV8::preprocess(class std::vector<class cv::Mat,class std::allocator > const &)" (?preprocess@YOLOV8@@UEAAXAEBV?$vector@VMat@cv@@v?$allocator@VMat@cv@@@std@@@std@@@z) 中引用了该符号 tensorrt-alpha-yolov8 E:\Vs_Projects_2023\tensorrt-alpha-yolov8\tensorrt-alpha-yolov8\yolov8.obj 1
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 "void __cdecl nmsDeviceV1(struct utils::InitParameter,float *,int,int,int)" (?nmsDeviceV1@@YAXUInitParameter@utils@@PEAMHHH@Z),函数 "public: virtual void __cdecl YOLOV8::postprocess(class std::vector<class cv::Mat,class std::allocator > const &)" (?postprocess@YOLOV8@@UEAAXAEBV?$vector@VMat@cv@@v?$allocator@VMat@cv@@@std@@@std@@@z) 中引用了该符号 tensorrt-alpha-yolov8 E:\Vs_Projects_2023\tensorrt-alpha-yolov8\tensorrt-alpha-yolov8\yolov8.obj 1
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2001 无法解析的外部符号 "public: virtual void __cdecl yolo::YOLO::reset(void)" (?reset@YOLO@yolo@@UEAAXXZ) tensorrt-alpha-yolov8 E:\Vs_Projects_2023\tensorrt-alpha-yolov8\tensorrt-alpha-yolov8\yolov8.obj 1
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 "void __cdecl yolov8::transposeDevice(struct utils::InitParameter,float *,int,int,int,float *,int,int)" (?transposeDevice@yolov8@@YAXUInitParameter@utils@@PEAMHHH1HH@Z),函数 "public: virtual void __cdecl YOLOV8::postprocess(class std::vector<class cv::Mat,class std::allocator > const &)" (?postprocess@YOLOV8@@UEAAXAEBV?$vector@VMat@cv@@v?$allocator@VMat@cv@@@std@@@std@@@z) 中引用了该符号 tensorrt-alpha-yolov8 E:\Vs_Projects_2023\tensorrt-alpha-yolov8\tensorrt-alpha-yolov8\yolov8.obj 1
报了28个类似的错误
尝试直接在cmd里用cmake编译也失败:
CMake Error at CMakeLists.txt:6 (PROJECT):
No CMAKE_CUDA_COMPILER could be found.
The text was updated successfully, but these errors were encountered: