How would I include open source library in my iPhone application?

Posted by greypoint on Stack Overflow See other posts from Stack Overflow or by greypoint
Published on 2010-05-02T14:11:44Z Indexed on 2010/05/02 14:17 UTC
Read the original article Hit count: 190

Filed under:
|
|
|
|

I have found an existing open source library that I would like to include in my iPhone project (the unrar source code found here: http://www.rarlab.com/rar_add.htm ).

I have compiled this source as a linked library on my Mac with "make lib" which creates the libunrar.so file just fine.

These are the makefile settings for that target:

lib:    WHAT=RARDLL
lib:    $(OBJECTS) $(LIB_OBJ)
        @rm -f libunrar.so
        $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)

Obviously I can't use this on iPhone but I imagine I should be able to compile with different options to make a static library that I can use.

Do I:

  • Compile it on the Mac with different make options then drag the resulting library (some kind of .a ?) into my xcode project? or
  • Drag all of the source code into my xcode project and create special targets of some kind to create it? or
  • Something else entirely different?

I've been working on solving my unrar problem for a couple of weeks now and I believe using this library will give me the best results but I just don't know the final steps to make use of it.

Thanks for all advice.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode