OSX中的RTMPDump xcode proect

时间:2016-06-17 19:24:42

标签: xcode macos static-libraries rtmp

我一直在尝试将RTMPDump(librtmp)添加到我正在尝试编写的OS X应用程序的Xcode项目中。我通过在可可豆荚上使用librtmp-ios成功地将它用于IOS应用程序,但我正在努力如何在我的OS X项目中构建它。我不断收到错误,例如不是为x86_64架构而构建的 有没有人设法让rtmpdump在OS X Xcode项目中工作?

我已经通过终端brew instal rtmpdump安装了rtmpdump并且可以使用rtmp终端程序但是对于我的生活,我无法将其与我的项目联系起来。

以下是RTMPDump git hub页面的链接,如果有人需要它https://github.com/eugenehp/rtmpdump

1 个答案:

答案 0 :(得分:0)

我最终得到了它的工作方式以及让它工作的方式我会发誓我的生活,我尝试过,但现在就是。

我通过

重新安装了RTMPDump
public static final int FROM_HTML_MODE_COMPACT = 63;
public static final int FROM_HTML_MODE_LEGACY = 0;
public static final int FROM_HTML_OPTION_USE_CSS_COLORS = 256;
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_BLOCKQUOTE = 32;
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_DIV = 16;
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_HEADING = 2;
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_LIST = 8;
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_LIST_ITEM = 4;
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH = 1;
public static final int TO_HTML_PARAGRAPH_LINES_CONSECUTIVE = 0;
public static final int TO_HTML_PARAGRAPH_LINES_INDIVIDUAL = 1;

brew install rtmpdump
然后我将librtmp.dylib拖到我的Xcode项目中,选择了add to target并复制了选中。

接下来我添加了/usr/local/Cellar/rtmpdump/2.4+20151223/lib
 文件夹到我的项目但我没有将它添加到目标。

在我的构建设置中,我将/usr/local/Cellar/rtmpdump/2.4+20151223/include添加到了我的图书馆搜索路径

从那里我可以导入我的“rtmp.h”文件,它正在工作。
如果有人能向我解释为什么这样做有效并且现在没有给我x86_64错误,我会很高兴。