Recursive shared Library Dependency

Hi guys,
Suppose I have developed a shared library called B which I use in my C++ project using CMAKE. My OS is Ubuntu in Jetson. Lib B itself uses shared lib A. To compile my project, I have to specify the path to lib B as well as lib A. Is it possible to build lib B such that only the path to lib B is required whenever it is used in a C++ project?
a concreate example is that I use OpenCV CUDA in my c++ project and OpenCV CUDA needs cublasLt so compiler forces me to add cublasLt. I don’t use cublasLt directly but compiler forces me to add this library.
Thanks so much

Hi, I don’t think it’s possible.
You may delete cuBLASLt from the linking option if functions you use in OpenCV CUDA does not link against it, but otherwise you have to specify the path to the library.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.