
gcc
文章平均质量分 73
king_on
我是谁?
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
gcc编译动态链接库
演示动态链接库的编译和使用 1. 编写代码 *************hello.h************** void print_hello(); ***********hello.c************** #include "hello.h" #include void print_hello() { printf("hello world!"); }2.原创 2012-10-20 21:01:08 · 983 阅读 · 0 评论 -
gcc编译-同时包含静态库和共享库
1. 当在同一个目录下静态库和共享库同名时,共享库优先 hello.h头文件 #ifndef HELLO_H #define HELLO_H void print_hello(); #endif hello.c源文件 #include "hello.h" #include int main(int argc,char *argv[]) { printf("hello world!");原创 2012-10-23 20:03:53 · 4173 阅读 · 0 评论 -
gcc 编译静态链接库
静态链接库(static library)是目标文件(.o文件或.obj文件)的集合,后缀为.a 在编译使用时,静态库会被拷贝到可执行文件中,所以最终生成的可执行文件不依赖于静态库。但这也使得可执行文件庞大,加载速度慢的问题。另外,一旦修改,就必须重新编译,不能想共享库那样灵活的升级。 本文对gcc编辑静态链接库演示一个示例,供参考,好记星不如烂笔头。 1. 编写代码 编写he原创 2012-10-23 19:55:43 · 6402 阅读 · 0 评论