linux gcc 编译动态类库(.so)和静态类库(.a)
我的编译环境 ubuntu desktop 16.04
一:测试代码
测试有3个文件:AB.h,AB.c,test.c
//AB.h void hello(); //AB.c #include <stdio.h> void hello() { printf("hello from AB.c \n"); } //test.c #include <stdio.h> #include "AB.h" void main(void) { printf("it is main\n"); hello(); }