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:
Write an interface header file containing signature declarations of all functions from required dependent libraries. Include it in your code.
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.
Use those addresses to invoke that function thereafter from your code
While compiling and linking make sure you dont statically link those dependent libraries.
Aviator
2009-10-09 19:21:16
am not writing any apllication.
kadeshpa
2009-10-12 13:47:51