简体   繁体   English

MGTwitterEngine用于Iphone SDK错误

[英]MGTwitterEngine for Iphone SDK errors

I'm trying to get MGTwitterEngine to work for the iPhone SDK. 我正在努力让MGTwitterEngine适用于iPhone SDK。 I've followed the read me below and now I keep getting the following errors: 我按照下面的阅读我,现在我不断收到以下错误:

TCDownload.h: No such file or directory yajl_parse.h: No such file or directory TCDownload.h:没有这样的文件或目录yajl_parse.h:没有这样的文件或目录

Now, I've done a search on my system and don't have either one of them. 现在,我已经对我的系统进行了搜索,并且没有其中任何一个。 So am I missing something? 我错过了什么吗? Also, I've downloaded the MGTwitterEngine code within the last couple days from gitub. 另外,我在gitub的最后几天内下载了MGTwitterEngine代码。

READ ME 请你

  1. Add libxml2.dylib in Other Frameworks. 在其他框架中添加libxml2.dylib。 You'll find the library in: 您将在以下位置找到该库:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/libxml2.dylib /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/libxml2.dylib

  2. Add "$SDKROOT/usr/include/libxml2" as a Header Search Path in your Project Settings. 在项目设置中添加“$ SDKROOT / usr / include / libxml2”作为标题搜索路径。

Although I've never used MGTwitterEngine, that error basically says that you are missing yajl library. 虽然我从未使用过MGTwitterEngine,但该错误基本上表示您缺少yajl库。

You can install it manually by doing (I assume you install to default /usr/local location): 您可以通过手动安装它(我假设您安装到默认的/ usr / local位置):

git clone git://github.com/lloyd/yajl
cd yajl
./configure
sudo make install

Then in your xcode project: 然后在你的xcode项目中:

Add libyajl.dylib or libyajl_s.a (dynamic/static - whichever you prefer, either should be located in /usr/local/lib/) to 'external frameworks and libraries' in your project tree. 将libyajl.dylib或libyajl_s.a(动态/静态 - 无论您喜欢哪个,应该位于/ usr / local / lib /中)添加到项目树中的“外部框架和库”。 In project settings add "/usr/local/include/yajl/" and (possibly) "/usr/local/include/" to Header Search Paths (in Search Paths section). 在项目设置中,将“/ usr / local / include / yajl /”和(可能)“/ usr / local / include /”添加到标题搜索路径(在“搜索路径”部分中)。

After that it should build. 之后它应该建立。

On mac, you can use port (See how to install here ) 在Mac上,您可以使用端口(请参阅此处的安装方法)

After install simply type in terminal : 安装完成后只需键入终端:

sudo port install yajl sudo port安装yajl

And like ttvd say before: 就像ttvd之前说的那样:

In your xcode project: 在你的xcode项目中:

Add libyajl.dylib or libyajl_s.a (dynamic/static - whichever you prefer, either should be located in /usr/local/lib/) to 'external frameworks and libraries' in your project tree. 将libyajl.dylib或libyajl_s.a(动态/静态 - 无论您喜欢哪个,应该位于/ usr / local / lib /中)添加到项目树中的“外部框架和库”。 In project settings add "/usr/local/include/yajl/" and (possibly) "/usr/local/include/" to Header Search Paths (in Search Paths section). 在项目设置中,将“/ usr / local / include / yajl /”和(可能)“/ usr / local / include /”添加到标题搜索路径(在“搜索路径”部分中)。

This works if you don't care about YAJL: 如果您不关心YAJL,这是有效的:

"Guys – the yajl/yajl_parse.h error is confusing and the reason the demo works is that the files that need yajl are excluded from building, even though they're in the project. To fix in your own project go into the MGTwitter folder via xcode and select each .m file with the term yajl in it (there should be 6), right-click -> Get Info -> Targets tab and uncheck the box next to your app name. HTH, Jon" “伙计们 - yajl / yajl_parse.h错误令人困惑,而且演示工作的原因是需要yajl的文件被排除在构建之外,即使它们在项目中。要修复你自己的项目,请进入MGTwitter文件夹通过xcode并选择每个.m文件,其中包含术语yajl(应该有6个),右键单击 - >获取信息 - >目标选项卡,然后取消选中应用名称旁边的框.HTH,Jon“

One of the comments on http://aralbalkan.com/3133 http://aralbalkan.com/3133上的评论之一

I am just going to add something because I think it is important and I usually hacked around it in the past. 我只是想添加一些内容,因为我觉得它很重要,而且我过去经常会乱砍它。

---->> The header search paths are defined in project settings but are over-ridden in the target settings so if you are having problems including certain files check the header search paths that are set in your target settings. ---- >>标题搜索路径在项目设置中定义,但在目标设置中被覆盖,因此如果您遇到包括某些文件在内的问题,请检查在目标设置中设置的标题搜索路径。 If they are bold then they are being used and overriding the default settings for the project. 如果它们是粗体,则它们将被使用并覆盖项目的默认设置。

dl and install this: http://cmake.org before dl并安装此: http//cmake.org之前

git clone git://github.com/lloyd/yajl cd yajl ./configure sudo make install git clone git://github.com/lloyd/yajl cd yajl ./configure sudo make install

then add the dylibs and you should be ok! 然后添加dylibs你应该没问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM