将GSL与Xcode集成 [英] Integrating GSL with Xcode

查看:114
本文介绍了将GSL与Xcode集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取Xcode 5.1.1来查找GSL的标头.我的理想解决方案是使我能够在以后的所有项目中访问这些标头,而无需进行额外的工作(如果可以的话,可以自动).大多数指令似乎都说要在项目的构建设置"->搜索路径"部分下添加库路径,但是,我的项目中似乎没有库或标头选项.我也尝试过在构建阶段"选项卡下使用链接库二进制文件",但是/usr/local/include是不可见的",我不愿意将这些头文件从其安装位置移开(除非这是正常/可以接受的).最后,我尝试编辑源树"首选项以添加库路径,但这似乎也不起作用.如果我没有正确地完成最后一部分,我不会感到惊讶,因为我对正确的执行方式感到困惑.

I am trying to get Xcode 5.1.1 to find the headers of GSL. My ideal solution would be one that would allow me to access these headers on all future projects with no extra work (automagically if you will). Most instructions seem to say to add the library path under the project's Build Setting -> Search Path section, however, my project does not seem to have a library or header option there. I have also tried to use the Link Binary with Libraries under the Build Phases tab, but /usr/local/include is "invisible" and I am reluctant to move these headers from their install location (unless this is normal/acceptable). Lastly I have tried to edit the Source Trees preference to add the library path, but this does not seem to work either. I wouldn't be surprised if I was doing that last part incorrectly as I am rather confused about the proper way of doing it.

推荐答案

此解决方案适用于Xcode 5.1

This solution works on Xcode 5.1

在侧视图中单击您的项目,应该有一个选项卡,可以将其设置为基本"或全部",选择全部".在标有链接"的小节下,应该有一个名为其他链接器"的字段,输入以下标志:

In the side view click on your project, there should be a tab that can either be set to "Basic" or "All," select "All." Under the subsection labeled "Linking" there should be a field called "Other Linkers" enter these flags:

-I/usr/本地/包含-L/usr/local/lib-lgsl-lgslcblas

-I/usr/local/include -L/usr/local/lib -lgsl -lgslcblas

这篇关于将GSL与Xcode集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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