<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>GCC on 夜云泊</title>
    <link>https://lifeislife.cn/tags/gcc/</link>
    <description>feedId:57980998056508425+userId:73222296380546048 Recent content in GCC on 夜云泊</description>
    <generator>Hugo -- 0.161.1</generator>
    <language>zh</language>
    <lastBuildDate>Fri, 03 Sep 2021 09:26:34 +0000</lastBuildDate>
    <atom:link href="https://lifeislife.cn/tags/gcc/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>解决 fatal error: bits/libc-header-start.h：no such file</title>
      <link>https://lifeislife.cn/posts/%E8%A7%A3%E5%86%B3fatal-error-bits-libc-header-start-hno-such-file/</link>
      <pubDate>Fri, 03 Sep 2021 09:26:34 +0000</pubDate>
      <guid>https://lifeislife.cn/posts/%E8%A7%A3%E5%86%B3fatal-error-bits-libc-header-start-hno-such-file/</guid>
      <description>&lt;h2 id=&#34;保留现场&#34;&gt;保留现场&lt;/h2&gt;
&lt;p&gt;想要分别编译 32 位和 64 位的程序时，gcc 出现了错误，&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;In file included from func_call.c:1:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: 没有那个文件或目录
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   27 | #include &amp;lt;bits/libc-header-start.h&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;compilation terminated.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;问题解决&#34;&gt;问题解决&lt;/h2&gt;
&lt;p&gt;问题原因猜测是默认 gcc 只提供当前机器的版本，解决如下&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;apt install gcc-multilib
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
      <content:encoded><![CDATA[<h2 id="保留现场">保留现场</h2>
<p>想要分别编译 32 位和 64 位的程序时，gcc 出现了错误，</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">In file included from func_call.c:1:
</span></span><span class="line"><span class="cl">/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: 没有那个文件或目录
</span></span><span class="line"><span class="cl">   27 | #include &lt;bits/libc-header-start.h&gt;
</span></span><span class="line"><span class="cl">      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
</span></span><span class="line"><span class="cl">compilation terminated.
</span></span></code></pre></div><h2 id="问题解决">问题解决</h2>
<p>问题原因猜测是默认 gcc 只提供当前机器的版本，解决如下</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">apt install gcc-multilib
</span></span></code></pre></div>]]></content:encoded>
    </item>
  </channel>
</rss>
