How do I compile libnoise on Mac OS X Mountain Lio

此生再无相见时 提交于 2019-12-23 15:13:45

问题


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?


回答1:


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




回答2:


I'm not entirely sure if this is what was meant by "with a different fork and cmake"

but I got libnoise to run in my mac using this git repo.

https://github.com/qknight/libnoise



来源:https://stackoverflow.com/questions/12558007/how-do-i-compile-libnoise-on-mac-os-x-mountain-lio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!