c语言编译

1、编译动态库

gcc -shared -o libtest.so test.c
gcc -shared -o libtest.dll test.c

2、编译包含第三方库的可执行程序

gcc -c test.c //生成test.o
gcc main.c -static -L. test.o

 

posted @ 2023-04-07 17:54  梧桐潇雨  阅读(21)  评论(0编辑  收藏  举报