据linux c一站式编程讲,linux下c语言开发需要如下工具:
- gcc: The GNU C compiler
- libc6-dev: GNU C Library: Development Libraries and Header Files
- manpages-dev: Manual pages about using GNU/Linux for development
- manpages-posix-dev: Manual pages about using a POSIX system for development
- binutils: The GNU assembler, linker and binary utilities
- gdb: The GNU Debugger
- make: The GNU version of the “make” utility
一.安装gcc编译器(ubuntu自带gcc)
sudo apt-get install build-essential
使用gcc --version查看版本
二.hello wrold
#include <stdio.h>
int main(void)
{
printf("hello world/n");
return 0;
}
打开shell,执行
gcc hello.c -o hello
如果不加-o选项,默认输出a.out
然后运行使用./hello或者./a.out
本文详细介绍了在Linux环境下使用GCC编译器进行C语言开发的步骤,并通过Hello World示例展示了实际操作过程。

被折叠的 条评论
为什么被折叠?



