views:

19

answers:

1

I built few open source binary/libraries and found that the binary/library is dependent on other libraries statically.I want it to link dynamically. This would allow my binaries be moved to any location and will be path independent. I mean if i export the Library path the binary should be able to locate the library and run successfully.

A: 
  1. Write an interface header file containing signature declarations of all functions from required dependent libraries. Include it in your code.

  2. Depending on requirement, use a platform specific loadlibrary function to load it, and then use getprocaddress like function to get the address of required function.

  3. Use those addresses to invoke that function thereafter from your code

  4. While compiling and linking make sure you dont statically link those dependent libraries.

Aviator
am not writing any apllication.
kadeshpa