Linux下gcc编译过程实例讲解
本次讲解基于C++,在ubuntu下编译一段实例代码,详细讲解gcc的编译过程。
通过本教程,你将掌握Linux下gcc编译过程和原理。
1、Linux下C/C++编译原理及过程
详见我的博客:
Linux下C/C++编译原理及过程:https://blog.youkuaiyun.com/Zhangyanfeng1/article/details/111028540
2、C++实例代码
/*!
* Copyright (c) 2020,ZYF.
* All Rights Reserved.
*
* \file main.c
* \brief 测试
*
* \author ZYF
* \date 2020/12/09 23:28:20
* \version 1.0.0
*/
#include <stdio.h>
#define MAX 500
#define MIN 20
#define _DEBUG
#define SetBit(x) (1<<x)
int main(int argc, char* argv[])
{
printf("ZYF Start \n");
printf("MAX = %d,MIN = %d,MAX + MIN = %d\n",MAX,MIN,MAX + MIN);
#ifdef _DEBUG
printf("SetBit(5) = %d,SetBit(6) = %d\n"