c - Mac OS X: Extending a shared library by adding a function -
i extend shared c library (dylib) on mac os x adding function. let's call function const char *get_string(void)
. here approach:
i created new shared library containing get_string(void)
function , liked against library wanted extend. library wrapper speak. far good. next step link application against new extended library problem extended library export symbol _get_string
not symbols of original library. that's why linking against "extended" library (instead of original library) produces lot of unresolved symbol warnings/error.
is there way export symbols of original library (there lot) or there better approach solve problem. want extend existing library. btw have access original library's source can't recompile it.
thanks in advance!
how option ld:
-reexport-lx same -lx specifies symbols in library x should available clients linking library being created. done separate -sub_library option.
Comments
Post a Comment