day8 coding: 静态库的生成和使用-使用相对依赖路径
This commit is contained in:
parent
06c95ae1a1
commit
0baf7f02f8
|
@ -14,4 +14,6 @@ ar rc libxxx.a xxx.o
|
||||||
gcc -static test.c -L/home/.../libs -lxxx -I/home/.../includes
|
gcc -static test.c -L/home/.../libs -lxxx -I/home/.../includes
|
||||||
# 生成自定义可执行文件 test
|
# 生成自定义可执行文件 test
|
||||||
gcc -static test.c -o test -L/home/.../libs -lxxx -I/home/.../includes
|
gcc -static test.c -o test -L/home/.../libs -lxxx -I/home/.../includes
|
||||||
|
# 生成自定义可执行文件 test 并使用相对依赖路径
|
||||||
|
gcc -static test.c -o test -L./my/libs -lmy -I./my/includes
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue