<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Miguel Angel Barrera Palomares on Medium]]></title>
        <description><![CDATA[Stories by Miguel Angel Barrera Palomares on Medium]]></description>
        <link>https://medium.com/@miguejs23?source=rss-3629d0094612------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*urZIokl1L4UbyFsS--ETTw.jpeg</url>
            <title>Stories by Miguel Angel Barrera Palomares on Medium</title>
            <link>https://medium.com/@miguejs23?source=rss-3629d0094612------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 17:11:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@miguejs23/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Steps to compiling a C program: A detailed view of the 4 internal moments when compiling.]]></title>
            <link>https://medium.com/@miguejs23/steps-to-compiling-a-c-program-a-detailed-view-of-the-4-internal-moments-when-compiling-a51416d544dc?source=rss-3629d0094612------2</link>
            <guid isPermaLink="false">https://medium.com/p/a51416d544dc</guid>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[compilation]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[c-language]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Miguel Angel Barrera Palomares]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 05:03:44 GMT</pubDate>
            <atom:updated>2021-10-05T05:03:44.830Z</atom:updated>
            <content:encoded><![CDATA[<p>Compilation is the process by which the code in a C file “filename.c” is converted into an executable file in object code format which is understood by the machine.<br>This process consists of 4 steps: preprocessing, compilation, assembly and linking. Collectively called compilation.</p><figure><img alt="Source code of a file in C" src="https://cdn-images-1.medium.com/max/1024/1*KjttHqU4zKC0aN9lWyIZ3A.png" /><figcaption><strong>Source code of a file in C</strong></figcaption></figure><h4>Preprocessing</h4><p>This is the first step, it receives the source code of a C file “filename.c” to which it removes the comments, interprets directives such as “&lt;stdio.h&gt;” expanding its content, as well as the expansion of macros (Alias ​​for reusable code portion), etc.<br>The output of this step (preprocessing) is shown by default in the standard output and stored in a file “filename.i”.</p><p><em>We use the </em><strong><em>gcc -E filename.c</em></strong><em> instruction to generate the source code preprocess.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*r7cnqQGvVCuJl00bLuZYxw.png" /></figure><p><em>You can view the preprocessed code with a code editor</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7tp6t1tAGnv4eYxyScwbUQ.png" /><figcaption><strong>preprocessed code</strong></figcaption></figure><h4>Compiling</h4><p>It receives input the preprocessing result file “filename.i” and converts it to an assembly code file “filename.s”.</p><p><em>We use the </em><strong><em>gcc -S filename.c </em></strong><em>instruction to generate the asembly code.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*AeYSPIj0jQxGO0xdEsYf7g.png" /></figure><p><em>You can view the preprocessed code with a code editor</em></p><figure><img alt="Assembler code" src="https://cdn-images-1.medium.com/max/1024/1*mwWgrh5LF3PYIVWgyvoM5A.png" /><figcaption><strong>Assembler code</strong></figcaption></figure><h4>Assembly</h4><p>This stage consists of converting the assembler code resulting from the Compiling step and converting it to machine code, also called object code.<br>The file generated from this process is “filename.o” or “filename.obj” depending on what operating system your machine is running on.</p><p><em>We use the </em><strong><em>gcc -c filename.c</em></strong><em> instruction to generate the object code.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*bXuUa-zrklQpHXpBGo7zdA.png" /></figure><p><em>You can view the object code with a code editor</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*0Vo8YzFPSHbiXjsSHMiI1Q.png" /><figcaption><strong>Machine code</strong></figcaption></figure><h4>Linking</h4><p>It is the final part of the compilation process, in this the objective is to link the object code of our program as a result of the Assembly process with the object code of the library files and other files.<br>The output of this process (Linking) is an executable file that by default in UNIX-based systems is “a.out” and in DOS it is “filename.exe”.</p><p><em>We can execute the resulting file with the instruction -&gt; </em><strong><em>./a.out</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*nyGm5QnDyst-ftLAj5wjJA.png" /></figure><p><em>Write comments if you find something wrong or if you want to share more information on the topic discussed above.</em></p><p><em>thanks for your support !!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a51416d544dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>