开发者

How do you create, compile and use static and dynamic libraries in linux-like systems?

this is my main question:

How do you create, compile and use static and dynamic libraries in linux-like systems? What is the differenc开发者_高级运维e between them?

Are there any good free tutorials explaining this stuff for a total idiota like me. I've only done c# programming before. I know a little C, C++ and Objective-C. I'm developing for iPhone but I'm trying to compile several libraries for the iPhone without much success. I understand so far (well at least the very basics) what a makefile is and how to modify one, I think i can create a static library using the following: ar file1.o file2.o, i though i had to do CC file1.o file2.o because they had to be linked together using some magic. In C# it was really simple you get the dll add reference and you're done. Here it seems so complicated.

Another question: How can i cross compile to another platform ARM for example? Especially those libraries which don't have that ./configure thingy (which I know nothing about) for arm already set up.

Yet another one: What is CFLAGS = -isysroot path/to/some/sdk? What does it do?


How to Write Shared Libraries is about the best introduction to the topic that I've found.


I found this tutorial quite helpful. It has step-by-step instructions for building a shared object dynamic library. It has a couple minor mistakes in its example code and commands, but at least it has example code and commands.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜