Download presentation
Presentation is loading. Please wait.
1
Lei Zhao, USTC Gzip 编译及调试 Speaker: Lei Zhao ( 赵雷 ) Department of Computer Science & Technology University of Science & T echnology of China September 13, 2006
2
Lei Zhao, USTC Gzip: Compilation and Debug 2/35 一些概念及本文简称 IDE: Integrated Development Environment VC: Visual C++ 6.0 BC: Borland C++ 3.1 TC: Turbo C 2.0 各种软件根目录,一律简称 $SOME_HOME 如 $GZIP_HOME 、 $VC_HOME
3
Lei Zhao, USTC Gzip: Compilation and Debug 3/35 各编译器 IDE 用于 Gzip 源码 VC 编译通过,可直接运行,调试方便 BC for DOS 编译通过,不能直接运行,因此不能调试 BC for Win 编译通过,可直接运行,操作系统不支持 16 位调试器 TDW TC 编译通过,可直接运行、调试,不支持鼠标 结论:推荐使用 VC
4
Lei Zhao, USTC Gzip: Compilation and Debug 4/35 各种编译环境下 Gzip 的编译步骤 VC IDE BC IDE for DOS/Windows TC IDE VC/BC/TC 命令行
5
Lei Zhao, USTC Gzip: Compilation and Debug 5/35 各种编译环境下 Gzip 的编译步骤 VC IDE BC IDE for DOS/Windows TC IDE VC/BC/TC 命令行
6
Lei Zhao, USTC Gzip: Compilation and Debug 6/35 VC IDE 中 Gzip 编译步骤 —— 建立工程
7
Lei Zhao, USTC Gzip: Compilation and Debug 7/35 VC IDE 中 Gzip 编译步骤 —— 建立工程
8
Lei Zhao, USTC Gzip: Compilation and Debug 8/35 VC IDE 中 Gzip 编译步骤 —— 添加源文件
9
Lei Zhao, USTC Gzip: Compilation and Debug 9/35 VC IDE 中 Gzip 编译步骤 —— 编译运行
10
Lei Zhao, USTC Gzip: Compilation and Debug 10/35 VC IDE 中 Gzip 编译步骤 —— 参数设置
11
Lei Zhao, USTC Gzip: Compilation and Debug 11/35 VC IDE 中 Gzip 的调试 单步调试 Ctrl+F10: 执行到光标处 F10: 单步执行(不跟进函数调用) F11: 单步执行(跟进函数调用)
12
Lei Zhao, USTC Gzip: Compilation and Debug 12/35 VC IDE 中 Gzip 的调试 断点 F9: 设置 / 取消断点 F5: 执行到下一断点
13
Lei Zhao, USTC Gzip: Compilation and Debug 13/35 VC IDE 中 Gzip 的调试 查看信息 变量 寄存器 内存 调用栈
14
Lei Zhao, USTC Gzip: Compilation and Debug 14/35 各种编译环境下 Gzip 的编译步骤 VC IDE BC IDE for DOS/Windows TC IDE VC/BC/TC 命令行
15
Lei Zhao, USTC Gzip: Compilation and Debug 15/35 BC IDE 中 Gzip 编译步骤 $BC_HOME\BIN 目录下, BC.EXE/BCW.EXE 分别是 for DOS/Windows 的版本 建议使用 BCW.EXE
16
Lei Zhao, USTC Gzip: Compilation and Debug 16/35 BC IDE 中 Gzip 编译步骤 —— 建立工程 打开工程 -> 选择目录 -> 输入名称 ->ok
17
Lei Zhao, USTC Gzip: Compilation and Debug 17/35 BC IDE 中 Gzip 编译步骤 —— 添加源文件 只添加.c 文件
18
Lei Zhao, USTC Gzip: Compilation and Debug 18/35 BC IDE 中 Gzip 编译步骤 —— 设置目录 头文件: $BC_HOME\INCLUDE 库: $BC_HOME\LIB 输出:存放.obj.exe.map 文件
19
Lei Zhao, USTC Gzip: Compilation and Debug 19/35 BC IDE 中 Gzip 编译步骤 —— 编译运行 Make or Build all Arguments Run
20
Lei Zhao, USTC Gzip: Compilation and Debug 20/35 Gzip124 for BC 改变的源代码 拷贝 $GZIP_HOME\msdos\tailor.c 到 $GZIP_HOME\ 目录下 $GZIP_HOME\tailor.h 添加 NO_ASM 宏
21
Lei Zhao, USTC Gzip: Compilation and Debug 21/35 各种编译环境下 Gzip 的编译步骤 VC IDE BC IDE for DOS/Windows TC IDE VC/BC/TC 命令行
22
Lei Zhao, USTC Gzip: Compilation and Debug 22/35 TC IDE 中 Gzip 编译步骤 —— 设置工程 File->Load 打开 $GZIP_HOME\GZIP_TC.PRJ Project->Project name 设置为 GZIP_TC.PRJ File->Change dir 设置为 $GZIP_HOME\ Operation->Directories 设置类似 BC
23
Lei Zhao, USTC Gzip: Compilation and Debug 23/35 TC IDE 中 Gzip 编译步骤 —— 编译运行 F9 : Make Run->Run Options->Arguments 调试指令在 Run 中,与 VC 同名的指令作用也相 同
24
Lei Zhao, USTC Gzip: Compilation and Debug 24/35 Gzip124 for TC 改变的源代码 所有文件由 UNIX 格式转为 DOS 格式 $GZIP_HOME\tailor.h 添加了 NO_ASM 宏 $GZIP_HOME\msdos\gzip.prj 删去了第 16 行的 match.obj 拷贝 $GZIP_HOME\msdos\gzip.prj 到 $GZIP_HOME\ 下并更名为 GZIP_TC.prj $GZIP_HOME\ 目录下拷贝了 $TC_HOME\ 目录下的 WILDARGS.OBJ
25
Lei Zhao, USTC Gzip: Compilation and Debug 25/35 分别针对三个 IDE 的 Gzip124 下载地址 ftp://pb0511:pb0511@202.38.79.124:221 /gzip/ ftp://pb0511:pb0511@202.38.79.124:221 /gzip/ Gzip124 for VC.rar Gzip124 for BC.rar Gzip124 for TC.rar
26
Lei Zhao, USTC Gzip: Compilation and Debug 26/35 VC/BC/TC 命令行 命令行的方式不推荐使用 请参见另一篇文档《 gzip 的命令行方式编译》 下载地址: ftp://pb0511:pb0511@202.38.79.124:221/gzip/ ftp://pb0511:pb0511@202.38.79.124:221/gzip/
27
Lei Zhao, USTC Gzip: Compilation and Debug 27/35 Thanks !
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.