# man > gcc-ar(1)

---
type: CommandReference
command: gcc-ar
mode: man
section: 1
source: man-pages
---

## Quick Reference
- `gcc-ar cr libfoo.a foo.o` — Create archive libfoo.a from foo.o
- `gcc-ar rcs libbar.a bar.o` — Replace or add object and create index
- `gcc-ar t libfoo.a` — List contents of archive
- `gcc-ar x libfoo.a` — Extract all objects
- `gcc-ar d libfoo.a foo.o` — Delete foo.o from archive

## Name
gcc-ar — a wrapper around ar adding the --plugin option

## Synopsis
`gcc-ar [OPTION] ... [ARGS...]`

## Options
See [ar(1)](https://www.chedong.com/phpMan.php/man/ar/1/markdown) for a full list of options that ar understands.

## Examples
shell
# Create a static library
gcc-ar cr libfoo.a foo.o

# Replace or add object and create index
gcc-ar rcs libbar.a bar.o

# List contents of archive
gcc-ar t libfoo.a

# Extract all objects
gcc-ar x libfoo.a

# Delete object from archive
gcc-ar d libfoo.a foo.o
## See Also
- [ar(1)](https://www.chedong.com/phpMan.php/man/ar/1/markdown)