2023年2月7日

GDB调用

摘要: 编译时需要加-g参数: gcc -g -o test main.c 使用GDB执行:gdb test -GDB命令 阅读全文

posted @ 2023-02-07 21:16 信奉上帝的小和尚 阅读(5) 评论(0) 推荐(0) 编辑

动态链接库的动态加载

摘要: #include <stdio.h> #include <dlfcn.h> int main(void) { // 使用动态加载的编译时必须链接dl库(-ldl),因为动态加载的各种方法都在dl库中 // gcc main.c -o test -ldl /* 获取错误信息 char * dlerro 阅读全文

posted @ 2023-02-07 20:39 信奉上帝的小和尚 阅读(106) 评论(0) 推荐(0) 编辑

c语言动态库与静态库

摘要: // show.h #ifndef __SHOW_H_ #define __SHOW_H_ #include <stdio.h> #include "math.h" void show(int, char, int, pfunc); #endif // math.h #ifndef __MATH_H 阅读全文

posted @ 2023-02-07 16:53 信奉上帝的小和尚 阅读(41) 评论(0) 推荐(0) 编辑

导航