How to link latest Video SDK on Linux?

Hi NVidia. You have released Video SDK verion 8.1/ And you also performed heavy refactoring of the API which seems to be linking agains static nvcuvid lib. On windows you provided that static lib,bit not for Linux. And those nvcuvid functions do not link agains nvcuvid.so which comes with the driver.
I am running drivers 396 ,Ubuntu 16.04

For the lost soles like myself. If you are sure the nvcuvid.so is on lib path and that the linker finds it ok,and you’re still getting “undefined reference” for the NVDEC methods, put the nvcuvid.so name at the end of the linker list.It solved the issue for me.

Here is a similar post that might help: https://devtalk.nvidia.com/default/topic/1032583/video-codec-sdk/how-do-i-install-nvidia-video-codec-sdk-8-1-in-ubuntu-16-04-/