Loading .SO file using CMAKE

I am facing an issue while loading a .SO file using cmake
The error which I am getting is “undefined reference to” some function which I am accessing while building
Compilation of the code is proper.

There is not enough information here to give any useful advice. Are you trying to have CMake load a library? Where is the .so being loaded coming from? What is trying to load it? What symbol is missing?

Yes I am trying to use CMAKE to load a .so file, So when I loading and accessing functions from the .so file I am getting “undefined reference to” a function within .so file as an error.

Do you have the .SO placed in the same folder as the executable?

SO will be part of one folder, the include files of SO will be another folder, the executable will be third folder.
I am building the cmake in Visual studio for a cross platform build on linux.

CMake does not “load” .so files except via a heavily deprecated and discouraged API. What is the link line for this .so target? What symbol(s) are missing?