请告诉我它的作用?
$ ar -r libsldap.a
答案 0 :(得分:14)
“教一个人钓鱼”,我说:
[...]
DESCRIPTION
The GNU ar program creates, modifies, and extracts from archives. An
archive is a single file holding a collection of other files in a
structure that makes it possible to retrieve the original individual
files (called members of the archive).
[...]
man
是你的朋友。
答案 1 :(得分:3)
ar -r libsldap.a list-of-object-files
此行创建Linux静态库,它实际上是包含一个或多个.o文件的归档文件。之前使用编译器来创建这些.o文件。
http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/static-libraries.html