xcode - Including a debug build in a library's Mac OS X SDK -


I'm sure you know that it is common for your debug and release libraries to include in SDK. My question is, is this a standard way to go for the Mac OS X framework in terms of distributions and possibly xcode integration?

One option is to divide another completely different structure, e.g. MyLibrary.framework and MyLibraryDebug.framework . If this is to go in the right way, then what is the trick to tell Xcode to make the right use? When adding a framework to the Xcode project it was not the only option to add it to a build configuration, and it seems right that -mymeibreck [debug]

The Mac OS X Dynamic Linker ( dyld ) has a feature for this purpose: DYLD_IMAGE_SUFFIX . This will allow you to dynamically load the debug version of any framework or shared library that you have linked. You do not need to completely separate the .framework bundle; Just create another shared library called MyLibrary_debug . For example, the core foundation in Tiger includes debugging and profiling variants (it seems that they have not received security updates, but anyway):

 % ls -l / system / Library / frameworks / corefoundation framework / version / a / total 20080-rwxr-xr-x1 root wheel 1m 10th September 17:55 core forwarding * -rwxr-xr-x1 root wheel6m 24th April 2007 core foundation_degag * - Rwxr-xia -aks 1 root wheel 2m April 24, 2007 Core Forwardeshn_profail *  

As with the above structure of Apple, standard "debug" suffix _debug . Use the [debug] suffix to use the "When loading framework" setting in the normal pane on an executable (Xcode set DYLD_IMAGE_SUFFIX = _debug .

You Thinking using _debug can also be a good idea in the form of , but I suggest that you do not do this because Apple has broken the code _debug of its framework in many ways. libSystem , libmx and libmathcommon as leopard only. Debuges come with forms, but in snow leopards they break again (I ran into myself).

If you choose a different suffix for your debug library, then you will see the apple bugs Should not trigger and still will be able to share the rest of the framework (headers, resources, etc.) between normal and debug versions. / P>


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -