c - How to share variable in a shared object library -
i creating shared object library ld_preloaded program. in shared library, want use variables program. way of declaring such variables. note shared object library compiled separately program.
yes. must link program --export-dynamic make symbol table of program accessible libraries opened. if wish control symbols available , using libtool linking, can use parameters -export-symbols-regex specify available. if symbols required library not available when program loads, fail undefined symbol. platforms require different link flags (especially windows). consider using libtool make easier if not already.
Comments
Post a Comment