How do you use libtool to create .a files (static libraries) on Mac OS?

When it comes to using the terminal to build libraries manually, and unfortunately, I don't have much experience, and I'm a little stuck here.

I downloaded the library for objective-c, which comes with makefiles, etc.

I see that the folder also contains an executable file called "libtool", I did a few searches, and I suppose this is a program that I should use to create the necessary .a files ? Unfortunately, I really could not find a useful article for this that seemed to work.

The library folder contains .sh , .pc files , as well as some .la files , but I'm bit unsure, of which I have to use libtool as an input to compile them into a .a file .

So my question is, which files should you enter in libtool in order to compile them into the necessary .a file? And what commands do you use exactly for this?

Thank you all for your time :)

+5
source share
1 answer

First, a small introduction to static libraries:

Unix (, Mac OSX Linux) , ar.

, .a: .

, :

ar crv libmy_library.a objectfile1.o objectfile2.o

, libtool make , , , .la. , . , ,

find . -name '*.a'

, , makefile , , . make install.

libtool . .

+8

All Articles