Can't statically link with libnvcuvid.so

648 views Asked by At

I am trying to use the latest NVIDIA Video SDK, specifically - its NVDEC (hardware video decoder lib). I had been using the previous version for a while and it was loading function pointers in runtime from libnvcuvid.so, which on my machine is located in:

/usr/lib/nvidia-396/

It contains the folowing related items:

/usr/lib/nvidia-396/libnvcuvid.so

/usr/lib/nvidia-396/libnvcuvid.so.1

/usr/lib/nvidia-396/libnvcuvid.so.396.18

Now,in the latest SDK 8.1,there is no loading of library function pointers in runtime, but all the API methods marked as extern and static linking is used. On Windows they provide nvcuvid.lib. But on linux, the are only above mentioned SOs. My IDE targets that directory (triple checked;if I remove the path,the linker complains that it can't find the lib) correctly, also I put the libnvcuvid.so on the linker exactly the same way as I put cuda.so and cudart.so in the same place for static linking vs CUDA API. But I am still getting

"undefined reference"

for all cuvid functions declared in the latest header. As you can see, my drivers version is also up to date (8.1 requires at least 390).

Why it doesn't link?

UPDATE (linker):

/usr/bin/g++ -o bin/xxxxx_xxx_d @"xxxxx_xxx.txt" -L. -LDebug -L/usr/lib/nvidia-396 -L/usr/local/cuda-9.1/lib64 -lcuda -lcudart -lnvcuvid .....

0

There are 0 answers