摘要:
其他系统调用 stat #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> int stat(const char *path, struct stat *buf); int lstat(const char *pathn 阅读全文
posted @ 2022-01-16 17:20
hellozhangjz
阅读(53)
评论(0)
推荐(0)
摘要:
常用系统调用 open #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int open(const char *pathname, int flags, mode_t mode); 参数: pathname:文件的路径 阅读全文
posted @ 2022-01-16 17:11
hellozhangjz
阅读(132)
评论(0)
推荐(0)
摘要:
- 启动gdb:`gdb program` - 设置运行参数:`set args 10 20 30` - 启动程序: `run(r)`,`start` - 显示源代码:`list(l)` - 显示当前栈帧和运行行:`frame(f)` - 设置显示源代码的行数:`set listsize count 阅读全文
posted @ 2022-01-16 16:50
hellozhangjz
阅读(60)
评论(0)
推荐(0)
摘要:
静态链接 (1)制作静态链接 #生成目标文件 gcc -c add.c -o add.o gcc -c sub.c -o sub.o #制作静态库 ar -rcs libmylib.a add.o sub.o 在使用ar工具是时候需要添加参数:rcs r更新 c创建 s建立索引 (2)使用静态库 g 阅读全文
posted @ 2022-01-16 16:28
hellozhangjz
阅读(146)
评论(0)
推荐(0)

浙公网安备 33010602011771号