[转] gcc常用命令

GCC 中文手册 - 摘自纯C论坛 GCCSection: GNU Tools (1)Updated: 2003/12/05Index Return to Main Contents   NAMEgcc,g++-GNU工程的C和C++编译器(egcs-1.1.2)   总览(SYNOPSIS)gcc[option|filename ]... g++[option|filename ]... 警告(WARNIN 阅读详情

gcc常用命令2009-03-12 21:40GCC(GNU C Compiler or GNU Complier Collection)是GNU项目的编译器套件。它能够编译C、C++和Objective C语言编写的程序。GCC能够支持多种不同的C语言变体,比如ANSI C和传统(Kernighan和Ritchie,K&R)C。此外,GCC在g77的帮助下也能够编译Fortran程序,而用于支持Pascal,Modula 3,Ada 9X以及其他语言的编译器前端也在开发中。

使用GCC,程序员能够对编译过程有更多的控制。编译过程分为4个阶段:预处理,适当编译,汇编,连接。而程序员可以在编译的任何阶段结束后停止整个编译过程以检查或使用编译器在该阶段的输出信息。

1 GCC对文件扩展名的解释及对应处理方法
.c   C语言源代码; 预处理、编译、汇编
.C/.cc/.cxx  C++语言源代码; 预处理、编译、汇编
.m   Objective C语言源代码; 预处理、编译、汇编
.i   预处理后的C语言源代码; 编译、汇编
.ii 预处理后的C++语言源代码; 编译、汇编
.s/.S   汇编语言源代码; 汇编
.h   预处理文件(标头文件); (不常出现在指令行)
其他扩展名的文件是由连结程序来处理,通常有:
.o   编译后的目标代码(Object file)
.a/.so   编译后的库代码(Archive file)
2 常用命令行选项
GCC可以接受的命令行选项长达数页,下列只列出了最常用的部分。
选项 说明
-o FILE 指定输出文件名,在编译为目标代码时,这一选项不是必须的。如果FILE没有指定,默认文件名是a.out
-c 只编译不连接
-D FOO=BAR 在命令行定义预处理宏FOO,其值为BAR
-I DIRNAME 将DIRNAME加入到包含文件的搜索目录列表中
-L DIRNAME 将DIRNAME加入到库文件的搜索目录列表中
-static 链接静态库,即执行静态链接默认情况下GCC只链接共享库
-l FOO 链接名为libFOO的函数库
-g 在可执行程序中包含标准调试信息
-ggdb 在可执行程序中包含只有GNU debugger(gdb)才能识别的大量调试信息
-O 优化编译过的代码
-ON 指定代码优化的级别为N,0?N?3,默认N=1
-ansi 支持ANSI/ISO C的标准语法,取消GNU的语法扩展中与该标准有冲突部分(但这一选项并不能保证生成ANSI兼容的代码)
-pedantic 允许发出ANSI/ISO C标准所列出的所有警告
-pedantic-errors 允许发出ANSI/ISO C标准所列出的所有错误
-traditional 支持K&R C 语法
-w 关闭所有警告,建议不要使用此项
-Wall 允许发出GCC能提供的所有有用的警告
-Werror 把所有警告转换为错误,以在警告发生时终止编译
-MM 输出一个make兼容的相关列表
-v 显示在编译过程的每一步中用到的命令
参考文献:[美]Kurt Wall等著 张辉 译.《GNU/Linux编程指南》第二版 26-45.
更多信息请参考
http://gcc.gnu.org/onlinedocs/

 

OpenBmc开发11:添加传感器(I2C) 1 查看传感器信息 通过qemu以本地端口映射方式运行编译后的镜像,访问bmcweb页面的网址是:https://localhost:2443/,如果想用IP地址启动请参考:openbmc开发4:启动运行编译镜像。(这里以网桥方式启动,以ip地址方式访问BMC) 输入用户名和密码,密码是:0penBmc(第一个是数字)。 选择Health,然后点击Sensor,可以看到传感器信息。 2 查看传感器配置文件 进入meta-live/meta-test/recipes-phosphor/... 阅读详情

相关推荐

3DMax马克杯制作教程

01 在前视图创建一个【圆柱体】,设置参数,长度为32,高度为82;高度分段12、边数为16;如图所示。 02 点击鼠标右键,把圆柱体转换为可编辑多边形,如图所示。 03 在修改面板中,选择【多边形】层级,在视图中选择所示的面,使用缩放工具稍微缩小一点,如图所示。 04 点击【插入设置】,如图所示。 设置插入数量为2.5mm。 05 点击【挤出设置】,如图所示。 ...

youximoxingEDO的博客 3477

15个常用的gcc 命令选项

GCC编译器非常强大 ,在各个发行的linux系统中都非常流行,本文介绍的是一些常用的gcc编译选项 下面这段代码将回围绕整个文章: 编辑main.c如下. #include int main(void) { printf("\n The Geek Stuff\n"); return 0; } GCC编译选项 1.指定输出可执行文件的名字 使用最基本的gcc编译格

typename 记录点滴 3万+

UE5实战:如何用Mesh Shader优化你的游戏场景渲染(附性能对比)

本文深入探讨了在UE5中利用Mesh Shader优化游戏场景渲染的实战方法。通过对比传统渲染管线与GPU Driven Pipeline,详细阐述了Mesh Shader如何通过任务着色器和网格着色器两阶段并行处理,实现更精细的meshlet级剔除,从而显著降低Draw Call和GPU带宽,提升渲染性能。文章附有具体的性能对比数据与代码示例,为开发者优化高复杂度场景提供了有效路径。

sunny的博客 296

GCC命令

GCC(GNU Compiler Collection)是Linux下最常用的C语言编译器,是GNU项目中符合ANSI C标准的编译系统,能够编译用C、C++和Object C等语言编写的程序。同时它可以通过不同的前端模块来支持各种语言,如Java、Fortran、Pascal、Modula-3和Ada等。穿插一个玩笑: GNU意思是GNU’s not Unix而非角马。然而...

weixin_33874713的博客 472

Proteus+汇编+8086电子时钟实战:从框架搭建到中断驱动的核心实现

本文详细介绍了使用Proteus仿真软件和8086汇编语言实现电子时钟的完整过程。从程序框架搭建、内存分段模型理解,到核心的8259中断控制器配置与编程,再到中断服务程序编写和数码管动态扫描显示驱动,系统阐述了底层软硬件协同开发的核心原理与实战步骤。该项目是深入理解计算机中断机制和汇编语言编程的绝佳实践。

weixin_29189381的博客 413

基于STM32与毫米波雷达的非接触式睡眠监测系统

物联网和嵌入式系统技术正在推动医疗健康设备的智能化发展。通过传感器网络采集生理信号,结合信号处理算法实现健康监测已成为主流技术方案。毫米波雷达凭借其非接触检测特性,在呼吸、心率等生命体征监测中展现出独特优势。STM32系列MCU凭借丰富外设和低功耗特性,成为医疗级嵌入式设备的首选平台。本系统整合60GHz毫米波雷达、红外测温与无线传输模块,构建了完整的睡眠质量评估解决方案,其硬件架构设计、信号处理算法和低功耗优化策略对可穿戴医疗设备开发具有参考价值。

weixin_36369848的博客 611

GCC编译 C与C++ C89与C99

1) 最初的 ANSI C 标准 (X3.159-1989) 在 1989 年被批准,并于 1990 年发布。稍后这个标准被接受为 ISO 标准 (ISO/IEC 9899:1990) 。虽然 ISO 标准将 ANSI 标准的某些章节重新编号并变为条款,但是两者实际上并无区别。不论是 ANSI 标准还是 ISO 标准,通常都称之为 C89 ,偶尔也因为发布日期而被叫做 C90 。 ANSI 标准

whm2300的专栏 5460

App渗透 - 人脸识别登录绕过

一、APP抓包和逆向破解加密算法打开APP是一个登录框抓包后发现参数被加密了使用Jadx脱源码发现,并没有加壳也没有混淆,运气很好根据经验,先搜索Encrypt、Decrypt等关键字,发现在Common.js中有一个encryptData函数定位过去,一套加解密算法都写好了放在这放到浏览器console里面调试,果然没错二、寻找注入点首先测试了一下注入明文:{"userName":"TEST'...

渗透测试研究中心 2823

gcc常用命令选项

gcc这条命令用来将源代码生成可执行程序,下面来看一下gcc的常用选项。  1、无选项编译链接  例:命令:gcc test.c //会默认生成a.out可执行程序  2、-E: 进行预处理和编译,生成汇编文件。  命令:gcc -E test.c //会生成test.i文件 3、-S: 进行预处理,编译,汇编等步骤,生成“.s”文件  例:命令:gcc -S test.c //会

欢迎来到我的空间 1万+

Central Finance 全景解析:用 SAP S/4HANA 构建跨系统的财务中台与渐进式转型路径

Central Finance 是基于 SAP S/4HANA 的一种部署与应用场景:在不打断现有异构源系统运营的前提下,把多套 SAP 与非 SAP 系统中的财务与管理会计数据实时/准实时复制到一套中心化的 SAP S/4HANA 中,作为统一的记账与分析底座,逐步把选定的财务流程(如预算控制、付款、固定资产结账等)迁入中心系统。这让企业既能快速获得统一报表与统一核算结构,又为未来的整体迁移留出了弹性路径。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 387

基于深度学习的行人车辆检测与计数系统(UI界面+YOLOv8/v7/v6/v5代码+训练数据集)

从YOLOv1到最新的YOLOv8,其网络结构、训练策略和损失函数不断优化,性能持续提升。image_path, _ = QFileDialog.getOpenFileName(self, "选择图片文件", "", "Image Files (*.jpg *.png *.jpeg *.bmp)")video_path, _ = QFileDialog.getOpenFileName(self, "选择视频文件", "", "Video Files (*.mp4 *.avi *.mov *.mkv)")

YOLO 225

[转]Linux GCC常用命令

1简介 2简单编译 2.1预处理 2.2编译为汇编代码(Compilation) 2.3汇编(Assembly) 2.4连接(Linking) 3多个程序文件的编译 4检错 5库文件连接 5.1编译成可执行文件 5.2链接 5.3强制链接时使用静态链接库 1简介 GCC 的意思也只是 GNU C Compiler 而已。经过了这么多年的发展,GCC 已经不仅仅能支持 C 语言;它现在还支持 Ada

呃哦 574

大模型算法岗常见面试题100道

LangChain是一个用于构建和运行大型语言模型应用的开源框架。它提供了一套工具和组件,帮助开发者将大型语言模型(如 GPT-3)与其他工具和API结合,以完成更复杂的任务。1、LangChain包含哪些核心概念?Components:可重用的模块,例如API调用、数据库查询等。Chains:将多个Components链接在一起以完成特定任务的流程。Prompt Templates: 用于指导语言模型生成输出的文本模板。Output Parsers:解析语言模型输出的工具。

具身机器人和通用AI 1959

【转】Linux GCC常用命令

转自:http://www.cnblogs.com/ggjucheng/archive/2011/12/14/2287738.html 1简介 2简单编译 2.1预处理 2.2编译为汇编代码(Compilation) 2.3汇编(Assembly) 2.4连接(Linking) 3多个程序文件的编译 4检错 5库文件连接 5.1编译成可执行文件 5.2链接 5.3强制...

weixin_30377461的博客 68

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

(转)Linux GCC常用命令

1简介 2简单编译 2.1预处理 2.2编译为汇编代码(Compilation) 2.3汇编(Assembly) 2.4连接(Linking) 3多个程序文件的编译 4检错 5库文件连接 5.1编译成可执行文件 5.2链接 5.3强制链接时使用静态链接库 1简介 GCC 的意思也只是 GNU C Compiler 而已。经过了这么多年的发展,GCC ...

diaozoudan9072的博客 93

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

GCC 常用命令参数(转)

gcc这条命令用来将源代码生成可执行程序,下面来看一下gcc的常用选项。 1、无选项编译链接 例:命令:gcc test.c //会默认生成a.out可执行程序 2、-E: 进行预处理和编译,生成汇编文件。 命令:gcc -E test.c //会生成test.i文件 3、-S: 进行预处理,编译,汇编等步骤,生成”.s”文件 例:命令:gcc -S test.c //会生成t

Meliorem的博客 1012

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

linux查看编译工具链,linux gcc编译常用命令之gun工具链的使用

http://edu.51cto.com/lesson/id-20331.htmllinux gcc编译常用命令之gun工具链的使用Binutils源码工具包中的常用命令:gcc g++ ld ldd nm strings readelf addr2line stripobjcopy as ar gdb1、gcc/g++编译器示例:gcc -c test.cgcc -o test test...

weixin_35895431的博客 2238

gcc常用命令

gcc常用命令 文章目录**gcc常用命令**一丶-o文件的生成过程1.预处理2.编译3.汇编4.连接二、多个程序文件的编译三丶检错四丶库文件连接五丶gcc中二进制程序处理工具 一丶-o文件的生成过程 1.生成一个.c文件 在终端touch test.c 在C文件中写入程序 #include<stdio.h> int main(void) { printf("hello!\n"); return 0; } 一步到位的指令为gcc test.c -o test,但是实际上是分成四个阶段进行的

NiceBabyaaa的博客 5039

linux---GCC常用命令与GCC编译器

在已经学习与了解了gcc生成了静态库与动态库了之后,又通过对gcc的进一步练习,已经非常熟悉gcc的实质四步骤编译过程以及如何使用gcc进行编译。接着认识了与gcc相互合作的一些二进制程序工具,了解到这些工具的具体使用方式和它的具体作用。总的来说,本次收获还不错。

m0_63323712的博客 2736

gcc编译工具常用命令以及汇编语言

文章目录一、Linux GCC常用命令二、GCC编译器背后的故事二、使用步骤1.引入库2.读入数据总结 一、Linux GCC常用命令 1 新建一个文件test,代码如下: #include <stdio.h> int main(void) { printf("Hello World!\n"); return 0; } 直接编译指令如下: gcc test.c -o test 实际上编译过程有四个阶段,即预处理(也称预编译,Preprocessing)、编译 (Compilati.

MSY的博客 9339

Linux GCC 常用命令

Linux GCC 常用命令与汇编 文章目录Linux GCC 常用命令与汇编1 、简介2 、简单编译2.1 预处理2.2 编译为汇编代码2.3 汇编(Assembly)2.4 连接(Linking)3 、多个程序文件4、 检错5 、库文件连接5.1 编译成可执行文件5.2 链接5.3 强制链接时使用静态链接库6、汇编7、链接8、分析ELF文件8.1ELF 文件的段8.2反汇编 ELF 1 、简介 GCC 的意思也只是 GNU C Compiler 而已。经过了这么多年的发展,GCC 已经不仅仅能支持 C

m0_56739646的博客 3629

GCC常用命令

`gcc -E filename.c -o output_filename.i`:这个命令会对`filename.c`进行预处理,并将预处理后的代码输出到`output_filename.i`文件中。- `gcc -c output_filename.s -o output_filename.o`:这个命令会将汇编代码编译成目标文件,并将目标文件输出到`output_filename.o`文件中。#### 6. 多个程序文件的编译。#### 3. 编译为汇编代码。#### 1. 简单编译。

halong99的专栏 692

GCC编译器的常用命令及使用

一、用gcc生成静态库和动态库 在创建库函数之前,先来准备举例用的源程序,并将函数库的源程序编译成.o文件。 (1)编辑生成子程序hello.h、hello.c、main.c 先创建一个目录,用来保存用到的文件

weixin_47314449的博客 6257

GCC常用命令与nasm

目录一、Linux GCC 常用命令简单编译预处理编译为汇编代码(Compilation)汇编(Assembly)连接(Linking)多个程序文件的编译检错库文件链接编译成可执行文件链接强制链接时使用静态链接库二、C运行库准备工作编译过程三、分析 ELF 文件nasm汇编编译器生成文件与c代码生成大小比较 一、Linux GCC 常用命令 简单编译 实例 test.c #include <stdio.h> int main(void) { printf("Hello World!\n");

xing__Q的博客 698

gcc背后的故事和gcc常用命令

本文是关于gcc基本命令

m0_51969935的博客 332
上一篇: 【转】跟我一起写 Makefile
下一篇: 【转】C语言的5种存储类以及关键字volatile、restrict
continue_
博客等级 码龄18年 7粉丝 2原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值