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();
}
View Code

相关文章:

  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-07-08
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2021-06-27
  • 2021-06-18
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案