Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/125.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GMP与Xcode的链接问题 我试图运行一个C++项目,它也依赖于PBC()和GMP()。我已经在/usr/local/目录中安装了PBC和GMP。对于这个项目,我手动添加了PBC(PBC-0.5.14)和GMP(GMP-6.1.0)库(我将这些库拖到我的项目中)_C++_Xcode_Cryptography_Gmp - Fatal编程技术网

GMP与Xcode的链接问题 我试图运行一个C++项目,它也依赖于PBC()和GMP()。我已经在/usr/local/目录中安装了PBC和GMP。对于这个项目,我手动添加了PBC(PBC-0.5.14)和GMP(GMP-6.1.0)库(我将这些库拖到我的项目中)

GMP与Xcode的链接问题 我试图运行一个C++项目,它也依赖于PBC()和GMP()。我已经在/usr/local/目录中安装了PBC和GMP。对于这个项目,我手动添加了PBC(PBC-0.5.14)和GMP(GMP-6.1.0)库(我将这些库拖到我的项目中),c++,xcode,cryptography,gmp,C++,Xcode,Cryptography,Gmp,当我将-lgmp-lgmpxx标志添加到Xcode(7.2版)中的其他链接器标志中时,我得到了以下结果: ld: library not found for -lgmp clang: error: linker command failed with exit code 1 (use -v to see invocation) 当我在没有其他链接器标志的情况下构建(并清理)时,我得到: Undefined symbols for architecture x86_64: "_pairing

当我将-lgmp-lgmpxx标志添加到Xcode(7.2版)中的其他链接器标志中时,我得到了以下结果:

ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
当我在没有其他链接器标志的情况下构建(并清理)时,我得到:

Undefined symbols for architecture x86_64:
  "_pairing_clear", referenced from:
      Member::~Member() in member.o
      Manager::~Manager() in manager.o
      Verifier::~Verifier() in verifier.o
  "_pairing_init_set_str", referenced from:
      Member::Member() in member.o
      Manager::Manager() in manager.o
      Verifier::Verifier() in verifier.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有人知道如何解决这个问题或有什么建议吗? 谢谢。

在我的Ubuntu 15.10(64)上,libgmp安装到

> /usr/lib/i386-linux-gnu/libgmp.so.10
> /usr/lib/i386-linux-gnu/libgmp.so.10.2.0
> /usr/lib/i386-linux-gnu/openssl-1.0.0/engines/libgmp.so
> /usr/lib/x86_64-linux-gnu/libgmp.a /usr/lib/x86_64-linux-gnu/libgmp.so
> /usr/lib/x86_64-linux-gnu/libgmp.so.10
> /usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
> /usr/lib/x86_64-linux-gnu/libgmpxx.a
> /usr/lib/x86_64-linux-gnu/libgmpxx.so
> /usr/lib/x86_64-linux-gnu/libgmpxx.so.4
> /usr/lib/x86_64-linux-gnu/libgmpxx.so.4.4.0
我使用“locate libgmp”命令找到了这个。(查找搜索updatedb更新的内容。)

你说你在本地“安装”了它?我运行安装时没有任何选项。也许你的链接器没有被告知去哪里寻找LIB?可能会添加“-L‘本地位置’”

希望这有助于