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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -