在X $ C $ d。添加链接器标记 [英] Adding Linker Flags in Xcode

查看:120
本文介绍了在X $ C $ d。添加链接器标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(我不知道旗帜是我要找的字,但我会解释。)

(I'm not sure if "flag" is the word I'm looking for, but I'll explain it.)

我试图编译使用 GMP 大的数字图书馆计划。但是,为了能够符合GMP编译,我必须 -lgmp 添加到命令的末尾。例如,如果我想要编译program.c,我必须键入 GCC program.c -lgmp 。这是在命令行容易,但我不明白怎么做,在X $ C $℃。我怎样才能同时使用X code增加 lgmp 标志?

I am trying to compile a program that uses the GMP big number library. But to be able to compile with GMP, I have to add -lgmp to the end of the command. For example, if I want to compile "program.c", I have to type gcc program.c -lgmp. This is easy from the command line, but I don't see how to do it in Xcode. How can I add the lgmp flag while using Xcode?

推荐答案

在X code 组和文件列表中右键单击目标并选择获取信息从上下文菜单中。在构建标签,键入连接在搜索字段,然后找到其他链接器标记项目。

Right-click the target in the Xcode Groups and Files list and select Get Info from the contextual menu. In the Build tab, type linker into the search field and then locate the Other Linker Flags item.

双击其他链接器标记项,并添加 -lgmp

这篇关于在X $ C $ d。添加链接器标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆