title: Alternatives to dlsym() and dlopen() in C++
body: <p>I  have an application a part of which uses shared libraries. These libraries are linked at compile time.
  <br>
  At Runtime the loader expects the shared object to be in the <code>LD_LIBRARY_PATH</code> , if not found the entire application crashes with error "unable to load shared libraries".Note that there is no guarantee that client would be having the library, in that case I want the application to leave a suitable error message also the independent part should work correctly.</p>
  
  <p>For this purpose I am using <code>dlsym()</code> and <code>dlopen()</code> to use the API in the shared library. The problem with this is if I have a lot of functions in the API, i have to access them Individually using <code>dlsym()</code> and ptrs which in my case are leading to memory corruption and code crashes.</p>
  
  <p>Are there any alternatives for this?</p>