如何在Mac OS X Mountain Lio上编译libnoise [英] How do I compile libnoise on Mac OS X Mountain Lio

查看:148
本文介绍了如何在Mac OS X Mountain Lio上编译libnoise的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于编译基于linux的库,我是Mac OS X环境的新手。每当我使用一个库,我只是下载了.framework文件,添加到我的/ Library / Frameworks,并将其包含在我的XCODE项目,一切都很好。
现在我被libnoise困住了。我想在我的项目中使用它,我不知道如何生成.framework文件/目录。



你能帮助我吗?

解决方案

如果你有libnoise,很可能它包含一些 Makefile 通过运行

脚本。 

./configure
make all

(libnoise.a)为您的平台,OSX10.8。



Framework本质上是一个具有特定布局和一个.plist文件的文件夹。要自动生成这样的文件夹,您可以创建 Framework 类型的一个空的Xcode项目,并添加 libnoise.a



有关如何从静态库(.a文件)创建框架的详细说明: http://www.blackdogfoundry .com / blog / creating-a-library-to-be-shared-between-ios-and-mac-os-x /



在你的框架中缺少头文件,但也可以从libnoise源添加到Xcode项目。



这个SO回答也可能有用:框架和xcode4中的静态库之间的区别,以及如何调用它们



Apple的文档也很好: https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html < a>


I am new to the Mac OS X environment when it comes to compiling linux based libraries. Whenever I used a library i just downloaded the .framework file, added it to my /Library/Frameworks and included it in my XCODE project, and all was fine. Now I am stuck with libnoise. I want to use it on my project and I have no idea how to generate the .framework file/directory.

Can you help me please?

解决方案

If you have libnoise, most likely it contains some sort of a Makefile or a configure script.

By running the

 ./configure
 make all

you will get the library file (libnoise.a) for your platform, the OSX10.8.

Framework is essentially a folder with specific layout and a .plist file. To generate such a folder automatically, you may create an expty Xcode project of the type Framework and add the libnoise.a you've just created as a linker's input.

There is a detailed instruction on how to create the Framework from static libraries (.a files): http://www.blackdogfoundry.com/blog/creating-a-library-to-be-shared-between-ios-and-mac-os-x/

You might be missing the header files in you framework, but then can be also added to the Xcode project from libnoise sources.

This SO answer may be of use also: difference between framework and static library in xcode4, and how to call them

Apple's documentation is also good: https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html

这篇关于如何在Mac OS X Mountain Lio上编译libnoise的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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