Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compile libnoise on Mac OS X Mountain Lio

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?

like image 581
user1693266 Avatar asked Nov 04 '22 15:11

user1693266


2 Answers

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

like image 179
Viktor Latypov Avatar answered Nov 09 '22 09:11

Viktor Latypov


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

like image 30
ardowz Avatar answered Nov 09 '22 08:11

ardowz