Xcode Linker Flags斯坦福网络分析项目(SNAP)

时间:2017-02-20 10:17:37

标签: c++ xcode linker flags

我正在尝试在Xcode上使用C ++进行SNAP。我安装了SNAP并为Xcode提供了这两个标头搜索路径:/usr/local/Cellar/Snap-3.0/snap-core/和/usr/local/Cellar/Snap-3.0/glib-core /.

但它仍会产生以下错误。我相信我需要填写"其他链接器标志"在Xcode中,但我似乎无法做到正确。谢谢你的帮助。

C ++代码如下:

#include "Snap.h"
int main() {
return 0;
}

下面的错误信息

Undefined symbols for architecture x86_64:
  "ExeStop(char const*, char const*, char const*, char const*, int const&)", referenced from:
      TRStr::UnRef() in main.o
      TRStr::~TRStr() in main.o
      TRStr::GetNullRStr() in main.o
  "TStr::GetRStr(char const*)", referenced from:
      TStr::TStr(char const*) in main.o
ld: symbol(s) not found for architecture x86_64
**clang: error: linker command failed with exit code 1 (use -v to see invocation)**

1 个答案:

答案 0 :(得分:2)

一旦我在Xcode中的“其他链接器标志”中添加-lSnap.o

,它就可以工作