noahmr/yolov5-tensorrt

Cuda undefined reference

skp1204 opened this issue · 2 comments

I am trying to use the shared library in my project, in AGX Xavier platform. While compiling I am getting undefined referene error for Cuda as in the image below. Can you please help?

image

Hi @skp1204,

Could you share with me:

  • the commands you're using the compile the software
  • the versions of OpenCV and TensorRT that you're using

I'll try to reproduce the build error on my own Jetson system

Hello,
Thanks a lot for your reply. I am running jetpack 4.6 on my jetson platform which comes with Tensorrt 8.0.1 and OpenCV 4.1.1.
I compared my CMakeLists with the ones in the examples and saw that the undefined errors were all pertaining to the libraries listed in the command below. Once I changed my CMakeLists the code compiled successfully.
target_link_libraries(
nvinfer
nvonnxparser
${CUDA_CUDART_LIBRARY}
${OpenCV_LIBRARIES}
)