http://changhoward.blogspot.com/2009/02/using-gcc-to-create-static-and-shared.html
Static:
$ gcc -c hello.c world.c /* 編出 hello.o 與 world.o */
$ ar rcs libmylib.a hello.o world.o /* 包成 limylib.a */
Shared:
$ gcc -c -fPIC hello.c world.c
$ gcc -shared -Wl,-soname,libmylib.so.1 -o libmylib.so.1.0.0 hello.o world.o
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment