Compile a shared library which call OpenCV

I want to compile my shared library. This library will call some functions from OpenCV. After several fails, I come here for some help.

What’s the correct way to implement this in Nsight?

Thanks.