Error linking TensorRT libraries


Error linking TensortRT…
I am following the sample SSD example provided on GitHub and during build the tensorRT libraries do not link. I tried to add the following line to cmake - target_link_libraries(Project PUBLIC /usr/lib/ and the new error during compilation is - No Rule to make target /usr/lib/ needed by Project
My Cmake file is as follows -

cmake_minimum_required(VERSION 3.17)

set(CMAKE_PREFIX_PATH "/usr/local/cuda/")
find_package(OpenCV REQUIRED)
find_package(realsense2 REQUIRED)
find_package(dlib REQUIRED)
find_package(CUDA REQUIRED)

add_executable(Project main.cpp tracker.cpp tracker.h SSD.cpp SSD.h argsParser.h BatchStream.h buffers.h common.h
        EntropyCalibrator.h logger.cpp logging.h half.h)

target_link_libraries(Project PUBLIC ${OpenCV_LIBS})
target_link_libraries(Project PUBLIC dlib::dlib)
target_link_librarie(Project PUBLIC realsense2::realsense2 realsense2::realsense-file)
target_link_libraries(Project PUBLIC ${CUDA_LIBS})
target_link_libraries(Project PUBLIC -fopenmp -fopenmp-simd)
target_link_libraries(Project PUBLIC /usr/lib/


TensorRT Version: - 7.1.3
GPU Type: - RTX 2070
Nvidia Driver Version: 440.100
CUDA Version: 10.2
CUDNN Version: 8.0.2
Operating System + Version: Ubuntu 20.04 LTS
Python Version (if applicable): 3.8
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Steps To Reproduce

I am following the sampleSSD example in tensorRT examples. My TensortRT .h and .cpp are in /usr/include and .so files are in /usr/lib.
I used the .deb file to install the library.

Hi @atharva362,
Request you to check the installation doc of tensorRT.
Please check if you are setting the LIB_PATH correct.


Thanks a lot for replying @AakankshaS, I was providing the .so path wrong. it should have been /usr/lib/x86_64-linux-gnu.
Sorry for the silly question