开发者

How to use fopen from a C library while Using iPhone SDK

I apologize in advance if this has been addressed, but I have not found a specific answer as of yet.

First, I am trying to use a C library in an iPhone/Cocoa touch app. It compiles fine as a plain C project and as a plain Foundation project (using X-code). My problems is this: The library uses a dictionary file which is called directly using fopen(). My question is how can that file be accessed on an iPhone from a C library which does not or cannot use Objective-C/SDK routines. I'm assuming that开发者_Go百科 there is a way...somehow.

Thanks!


I think fopen is ok. But XCode put all resource files into the root directory. So maybe you should rewrite the library to open the file from the root.

Other solution is to create "folder reference" with "Add to project" menu. This way I think the whole folder will be copied to the app bundle.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜