This isn’t so much of a question as something I think is worth sharing about XCode, which I haven’t seen described elsewhere. I wanted to create a reusable framework which can be included in other people’s applications, which includes code from a static library (say, libmysqlclient.a). But I didn’t want to have people install the MySQL client libraries in addition to the reusable framework.
This is how you can achieve it, AFAIK:
Create your framework project.
Open the inspector for the Framework Target in the “Targets” smart group.
In the “header search paths”, add the path to the include files you want to use (ie, /usr/local/mysql/include)
Leave the “library search paths” as $(LIBRARY_SEARCH_PATHS)
Mach-O Type should be “Dynamic Library”
I switched prebinding off - I am not sure this has any affect in Tiger anymore anyway.
For “Other Linker Flags” I set “-seg1addr 0xC0000000” although again I am not sure this has any affect in Tiger.
Check “Perform Single-Object Prelink”
In Prelink libraries, add the path to the libraries you want sucked into your reusable Framework.
Installation directory should be “@executable_path/../Frameworks”
The other stuff is the usual framework stuff: Set the headers you want included in the framework as “public” in the “Role” column for example. When you compile your framework, the code gets sucked out of libmysqlclient.a and into your framework, so that your framework becomes portable without any dependency on the original static library, at the cost of a larger framework (in bytes).
(To include this framework in your application, add it into the project target and add a new “Copy files” build phase with subdirectory “Frameworks” then add the framework into the build phase also.)