Hello
when i use cmake to complie my project,it have complie successfully,but when i got the link stage
but i got the probelm like this
ld: not found. -lcusolver: No file or directory
ld: Not found -lcublas: No file or directory
ld: Not found -lcufft: No file or directory
when i add the libs in the shell path,this time it doesn’t works
it seems that i need add the libcusolver.so,libcubals.so,libcufft.so in the CmakeLists.txt,i know i can add this by -L/path/to/libraries/…,however how can i add it in the cmakeLists.txt
–best wishes
Are you using enable_language(CUDA) or find_package(CUDA)? The latter is deprecated and you should use the CUDA language instead. I think some of this comes from CUDAToolkit though?
All these libraries have target representations provided by the find_package(CUDAToolkit) module.
You would link to the CUDA::cusolver target which knows where the actual library is on disk.
i use the hpc_sdk,i can find the cusolver.so,cublas.so,cufft.so,but i can’t install the CUDAToolKit,so could tell how to add the shared time library in the project