使用gcc和编写Makefile学习笔记
1.编译器和gcc介绍
1.1为什么要使用编译器?
-C语言源程序需要经过编译和链接这两个过程才能够转换成二进制可执行程序。
-一般在unix系统中使用的c编译器是cc(C Compiler的缩写)。在各个linux发行版本中广泛使用的c编译器名
为gcc(GUN cc)。为了保持与Unix系统的兼容,在linux系统中cc作为了gcc的一个链接。
1.2 gcc能将c/c++源程序和目标程序编译并调用链接程序Id生产可执行文件,如果用户没有给出可执行文件的名
字,gcc将默认生成一个名为a.out的可执行文件。
example:
hello.c
#include<stdio.h>
main()
{
printf("Hello World!\n");
}
gcc -v:查看版本
gcc hello.c / cc hello.c
ls
./a.out
gcc -o hello hello.c
./hello
2.gcc基本使用
3.库的应用开发
4.Makefile介绍
5.使用make命令
6.makefile书写规则
7.makefile应用实例
8.源代码调试
分享到:
相关推荐
gcc-linaro-aarch64-none-elf-4.8-2013.11_linux
gcc-linaro-aarch64-none-elf-4.9-2014.07_linux.tar.bz2
ESP32C3GCC编译器。xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch2-win64
xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch2-win32 esp32资源for windows_x64(2022.03.22)
xtensa-esp32-elf-gcc8_4_0-esp-2021r1-win32.zip
xtensa-esp32-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz
xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-patch2-win32 esp32资源for windows_x64(2022.03.22)
Makefile文件arm-none-linux-gnueabi-gcc编译文件,linux下多个.C文件统一使用make文件进行编译
xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch5-win64
gcc-debuginfo-4.8.5-39.el7.x86_64.rpm 用于gdb调试的工具 debuginfo-install下载太慢,可以使用这个,注意版本号
riscv32-esp-elf-gcc8_4_0-esp-2021r1-win32.zip
gcc-4.6.2-glibc-2.13-linaro-multilib-2011.
交叉编译工具:gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.bz2 解压命令:tar jxvf gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.bz2
gcc-4.8.0 gcc-4.9.0 gcc-5.1.0 gcc-6.1.0 gcc-7.1.0 gcc-8.1.0 gcc-9.1.0.7z 已验证可用,请放心下载。GCC used to stand for the GNU C Compiler, but since the compiler supports several other languages aside...
xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch5-win64
离线安装包,亲测可用
xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch5-linux-amd64.tar
gcc-arm-none-eabi-10-2020-q4-major-win32.exe
gcc-base-debuginfo-4.8.5-39.el7.x86_64.rpm 是gdb调试 gcc-debuginfo-4.8.5-39.el7.x86_64.rpm的依赖,先安装这个
It includes the GNU Compiler (GCC) and is available free of charge directly from Arm for embedded software development on Windows, Linux and Mac OS X operating systems. Follow the links on this page ...