title: How to define an optional entry point into custom Mac OS X framework / dynamic library?
body: <p>In Windows there is a <strong>DllMain</strong> and <strong>DLL_PROCESS_ATTACH</strong> / <strong>DLL_PROCESS_DETACH</strong> flags, which allow to initialize / free resources after <strong>DLL</strong> is attached to a process... So how can I specify an entry point in case of <strong>OS X</strong>? As always, I can't find anything useful in Apple documentation :(</p>