On 06-Mar-16 7:43 PM, Jon Lederman wrote:
1) I am compiling a dynamic library that links to the boost command line options library as a shared library. When I try to unload the dynamic library, I find that it isn’t properly unloaded and the boost library seems to be causing the issue.
Jon, could you clarify how you try to unload the dynamic library, for what purpose, and how you determine it's not properly unloaded? If you link to program_options normally, just adding it on linker command line, it will be loaded automatically by the dynamic linker and will remain in memory until your program exits - although if you don't use the library after initial parsing, the unused code pages may be discarded by the operating system. I doubt explicitly unloading, with dlclose, is possible in this case. You possibly can use dlopen to load the library, but I can't see how that would work either, given it's a C++ library with a somewhat wide interface. Thanks, -- Vladimir Prus http://vladimirprus.com