Attaching a static library to an iphone/ipad application
- by Jack
Hello, which is the best approach to include a static library with into an application for iPhone or iPad?
I could choose to
compile the library supplying right platform and building a library file with the ar utility and then add as a framework to the project
including the source of the library .c/.h and compile them together with the application
The first approach seems simpler, because I won't care about managing all specific settings of the library I want to include but how can I create the library both for iPhone and iPad and allow xcode to use the right library upon linking?
The second approach seems more complex since xcode will take care about compiling my application and the library (with different settings I suppose) then how should I go? I can easily add sources of the lib but I'll have to include the make scripts to allow xcode use them to build in the right way.
Any suggestions about how to proceed? The library I'm trying to include is libssh. (I know that this library, of course, has already been compiled and tried succesfully on iPhone)
Thanks in advance.