cyrusbehr / tensorrt-cpp-api

TensorRT C++ API Tutorial
MIT License
577 stars 72 forks source link

for those who are struggling to compile #7

Closed BenBa99 closed 1 year ago

BenBa99 commented 1 year ago

add those to CmakeLists.txt:


find_path(TENSORRT_INCLUDE_DIR NvInfer.h HINTS ${CUDA_TOOLKIT_ROOT_DIR} ${CUDA_INCLUDE_DIRS})
find_library(TENSORRT_LIB nvinfer HINTS ${CUDA_TOOLKIT_ROOT_DIR} ${CUDA_LIBRARIES})
include_directories(${TENSORRT_INCLUDE_DIR})

#insert your cuda dir
include_directories(/usr/local/cuda/include)
#Insert here your tensorrt path
include_directories(/usr/src/tensorrt/samples/common)
link_libraries(${TENSORRT_LIB}) ```
cyrusbehr commented 1 year ago

Not exactly sure what the issue is here as it should have searched in the appropriate directories based on this cmake file, but hopefully this can help other users which are also stuck. Closing this issue for now.

mathanprasannakumar commented 10 months ago

Hey@cyrusbehr,

while building i am getting not declared in this scope for all the cuda declarations,Please help or guide me how can i solve this . Screenshot from 2023-10-09 16-55-26

cyrusbehr commented 10 months ago

@mathanprasannakumar please create a new issue.

mathanprasannakumar commented 10 months ago

@cyrusbehr I created a new issue yesterday , Please review the created issue and thanks for the reply.