博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
对 ar 命令的学习
阅读量:7081 次
发布时间:2019-06-28

本文共 1656 字,大约阅读时间需要 5 分钟。

学习makefile的写法的时候,遇到了 ar 命令。
进行了学习。下面的网址写得非常好:
http://www.thegeekstuff.com/2010/08/ar-command-examples/
还是通过例子来学习,来得比较快。此文很完美,暂时记录以作备忘。
再回头来 看 makefile 的说法:
复制代码
Archive Members as Targets
An individual member of an archive file can be used as a target or dependency in make. You specify the member named member in archive file archive as follows:
archive(member)
This construct is available only in targets and dependencies, not in commands! Most programs that you might use in commands do not support this syntax and cannot act directly on archive members. Only ar and other programs specifically designed to operate on archives can do so. Therefore, valid commands to update an archive member target probably must use ar. For example, this rule says to create a member `hack.o' in archive `foolib' by copying the file `hack.o':
foolib(hack.o) : hack.o
        ar cr foolib hack.o
In fact, nearly all archive member targets are updated in just this way and there is an implicit rule to do it for you. Note: The `c' flag to ar is required if the archive file does not already exist.
To specify several members in the same archive, you can write all the member names together between the parentheses. For example:
foolib(hack.o kludge.o)
is equivalent to:
foolib(hack.o) foolib(kludge.o)
You can also use shell-style wildcards in an archive member reference. See section Using Wildcard Characters in File Names. For example, `foolib(*.o)' expands to all existing members of the `foolib' archive whose names end in `.o'; perhaps `foolib(hack.o) foolib(kludge.o)'.
复制代码
本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/18/2690629.html,如需转载请自行联系原作者
你可能感兴趣的文章
请求http服务
查看>>
使用IIS应用程序初始化来保持ASP.NET应用程序的活动
查看>>
腾讯云使用
查看>>
数据结构02
查看>>
CheckBox的全选与不全选(刷新页面效果) .
查看>>
js使用post 方式打开新窗口,隐藏Url参数
查看>>
.CO域名快被这帮搞IT的玩坏了……
查看>>
C++ Primer 有感(异常处理)(二)
查看>>
Beginning Linux Programming 学习--chapter 17 Programming KDE using QT
查看>>
C#的Main(String[] args)参数输入问题
查看>>
7-4 是否同一棵二叉搜索树
查看>>
Handler,Message,Runnable和多线程的理解
查看>>
mysql 的 GROUP_CONCAT
查看>>
需求分析(二)
查看>>
Cocos Creator 对象池cc.NodePool的使用
查看>>
mssql 主从同步
查看>>
数据编码格式
查看>>
LeetCode(14):Longest Common Prefix
查看>>
工作经验之-分页查询
查看>>
转:试用SQL Azure
查看>>