Hi,
It looks like you try to open the library under deepstream-NVDS_VERSION rather than deepstream-5.0.
Please help to update the source to the corresponding path:
/* MODIFY: to reflect your own path */
#define NVDS_VERSION 5.0
#define SO_PATH "/opt/nvidia/deepstream/deepstream-5.0/lib/"
Thanks.