本文介绍了将GMP链接到Xcode 4.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经下载了GMP多精度库,我通过终端使用 gcc main.c -lgmp
命令编译没有错误的以下代码,但是我无法看出如何在XCode 4.5中包含 GMP
库,因为在线方式有点混乱。 我真的需要为我的项目使用 GMP
库,任何评论都将是很好的帮助。
#include< stdio.h>
#include< gmp.h>
int main(int argc,const char * argv [])
{
printf(Hello,World!\\\
);
mpz_t a;
return 0;
}
解决方案
(在问题编辑中回答转换为社区维基答案,请参阅)
OP写道:
I've downloaded the GMP multiprecision library and I compiled without errors the following code through the terminal with the gcc main.c -lgmp
command but I can't figure out how to include the GMP
library in XCode 4.5 because the howtos online are a bit confusing.
I really need to use the GMP
library for my projects and any comment would be great help.
#include <stdio.h>
#include <gmp.h>
int main(int argc, const char * argv[])
{
printf("Hello, World!\n");
mpz_t a;
return 0;
}
解决方案
(Answered in a question edit. Converted to a community wiki answer. See What is the appropriate action when the answer to a question is added to the question itself? )
The OP wrote:
这篇关于将GMP链接到Xcode 4.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!