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 ).
我找到了一个现有的开源库,我希望将其包含在我的iPhone项目中(unrar源代码可在此处找到: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.
我在Mac上用“make lib”编译了这个源作为链接库,它创建了libunrar.so文件就好了。
These are the makefile settings for that target:
这些是该目标的makefile设置:
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.
显然我不能在iPhone上使用它,但我想我应该能够使用不同的选项进行编译,以创建一个我可以使用的静态库。
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
- 使用不同的make选项在Mac上编译它然后将生成的库(某种.a?)拖到我的xcode项目中?要么
- Drag all of the source code into my xcode project and create special targets of some kind to create it? or
- 将所有源代码拖到我的xcode项目中并创建某种特殊目标来创建它?要么
- 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.
我几个星期以来一直在努力解决我的unrar问题,我相信使用这个库会给我最好的结果,但我只是不知道使用它的最后步骤。
Thanks for all advice.
谢谢你的建议。
1 个解决方案
#1
0
I think that you'll probably want to do the easiest thing first, create an empty iPhone project and bring all of the code into it, just to see if it will compile.
我想你可能首先要做最简单的事情,创建一个空的iPhone项目并将所有代码放入其中,只是为了看它是否会编译。
If so, you may want to use the empty project to aid in the development of an Objective-C wrapper, once that is complete you can bring the code into your existing project for integration and testing.
如果是这样,您可能希望使用空项目来帮助开发Objective-C包装器,一旦完成,您可以将代码带入现有项目以进行集成和测试。
If it looks like this is code that you would like to use with other projects, or you are feeling giving and would like to provide an iPhone port of the code, go ahead and pull this together into a library.
如果看起来这是您想要与其他项目一起使用的代码,或者您正在给予并希望提供代码的iPhone端口,请继续将它们整合到一个库中。
Here is a site that documents the process.
这是一个记录该过程的站点。
#1
0
I think that you'll probably want to do the easiest thing first, create an empty iPhone project and bring all of the code into it, just to see if it will compile.
我想你可能首先要做最简单的事情,创建一个空的iPhone项目并将所有代码放入其中,只是为了看它是否会编译。
If so, you may want to use the empty project to aid in the development of an Objective-C wrapper, once that is complete you can bring the code into your existing project for integration and testing.
如果是这样,您可能希望使用空项目来帮助开发Objective-C包装器,一旦完成,您可以将代码带入现有项目以进行集成和测试。
If it looks like this is code that you would like to use with other projects, or you are feeling giving and would like to provide an iPhone port of the code, go ahead and pull this together into a library.
如果看起来这是您想要与其他项目一起使用的代码,或者您正在给予并希望提供代码的iPhone端口,请继续将它们整合到一个库中。
Here is a site that documents the process.
这是一个记录该过程的站点。