修訂. | ed56057f569a00172c163f91d7f5eab90ecaee64 |
---|---|
大小 | 476 bytes |
時間 | 2006-12-10 23:58:13 |
作者 | iselllo |
Log Message | initial import |
#!/bin/sh
# Static library demo
# Create static library's object file, libhello−static.o.
# I'm using the name libhello−static to clearly
# differentiate the static library from the
# dynamic library examples, but you don't need to use
# "−static" in the names of your
# object files or static libraries.
# g++ −Wall −g −c −o mylib−static.o mylib.c
g++ -Wall -g -c -o mylib-static.o mylib.c -O2
# Create static library.
ar rcs mylib-static.a mylib-static.o