
BinutilsのDebian Wheezy armelバージョンに含まれている「ar」を使用しようとしていますが、他のシステムとは異なる動作をしているようです。
コマンドラインのいくつかのサンプル出力は次のとおりです。
$ ar
Usage: ar [options] archive
Generate an index to speed access to archives
The options are:
@<file> Read options from <file>
--plugin <name> Load the specified plugin
-t Update the archive's symbol map timestamp
-h --help Print this help message
-v --version Print version information
ar: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
$ ar -crs something.a file1.o file2.o
ar: invalid option -- 'c'
ar: invalid option -- 'r'
ar: invalid option -- 's'
私がここで何を見逃しているのでしょうか?間違ったオプションメッセージが表示されるのはなぜですか?
答え1
まず、「-c」は無効なキー文字です。私の考えでは、「d」、「m」、「p」、「q」、「r」、または「x」を最初のキーとして使用する必要があるようです。で合理的な説明を聞くことができますar --help
。
私の考えでは、しかし、あなたはそのar -rcs
代わりにarc -crs
。