Linux系统下C语言开发环境.pdfVIP

  • 5
  • 0
  • 约4千字
  • 约 5页
  • 2022-12-28 发布于上海
  • 举报
Linux下C语言编程环境概述 Linux下C语言编程常用的编辑器是vim或emacs ,编译器一般用gcc ,编译链接程序用make ,跟踪调试一 般使用gdb ,项目管理用makefile。下面先通过一个小程序来熟悉这些工具的基本应用。各个工具的详细 使用方法将在后面的各个章节逐步讲解。 (1) 要编辑C源程序,应首先打开vim或emacs编辑器,然后录入以下多段源代码。使用main函数调用 mytool1_print、mytool2_print这两个函数。 #include mytool1.h #include mytool2.h int main(int argc,char **argv) { mytool1_print(hello); mytool2_print(hello); } (2) 在mytool1.h中定义mytool1.c的头文件。 /* mytool1.h */ #ifndef_MYTOOL_1_H #define_MYTOOL_1_H void mytool1_print(char *print_str); #endif (3) 用mytool1.c实现一个简单的打印显示功能。 /* mytool1.c */ #include myto

文档评论(0)

1亿VIP精品文档

相关文档