📄 make-15.html
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>第十五章 make的常见错误信息</title>
<style>
<!--
h1
{margin-top:12.0pt;
margin-right:0pt;
margin-bottom:12.0pt;
margin-left:21.6pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:-21.6pt;
page-break-after:avoid;
tab-stops:list 21.6pt;
text-autospace:none;
font-size:16.0pt;
font-family:Arial;
}
p.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
text-autospace:none;
font-size:10.0pt;
font-family:"Times New Roman";
margin-left:0pt; margin-right:0pt; margin-top:0pt}
p.MsoBodyTextFirstIndent
{margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
line-height:150%;
text-autospace:none;
font-size:10.5pt;
font-family:Arial;
margin-left:0pt; margin-right:0pt; margin-top:0pt}
-->
</style>
</head>
<body>
<h1 align="center" style="text-align: center; text-indent: 0pt; margin-left: 9.9pt">
<a name="chapter_15"><span style="font-size: 18.0pt; font-family: 楷体_GB2312">
第十五章</span><span lang="EN-US" style="font-size: 18.0pt"> make</span><span style="font-size: 18.0pt; font-family: 楷体_GB2312">的常见错误信息</span></a></h1>
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: #222222">
<hr size="1" width="100%" align="center">
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">
本章对</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">执行时可能出现常见错误进行汇总、分析,并给出修正的可能方法。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">
make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">执行过程中所产生错误并不都是致命的;特别是在命令行之前存在“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">-</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">”、或者</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">使用“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">-k</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">”选项执行时。</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">执行过程的致命错误都带有前缀字符串“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">***</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">”。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">
错误信息都有前缀,一种是执行程序名作为错误前缀(通常是“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">”);另外一种是当</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">本身存在语法错误无法被</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">解析并执行时,前缀包含了</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: black">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">文件名和出现错误的行号。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">
在下述的错误列表中,省略了普通前缀:</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.1pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<b>
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: blue">
[FOO] Error NN</span></b></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.1pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<b>
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: blue">
[FOO] signal description</span></b></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: 0cm; margin-left: 36.0pt">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">
这类错误并不是</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">的真正错误。它表示</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">检测到</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">所调用的作为执行命令的程序返回一个非零状态(</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">Error
NN</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">),或者此命令程序以非正常方式退出(携带某种信号),参考</span><span style="font-size: 12.0pt; line-height: 150%; color: black">
<span lang="EN-US">
<a style="color: blue; text-decoration: underline; text-underline: single" href="#_命令的错误">
5.4 <span lang="EN-US" style="font-family: 楷体_GB2312">命令的错误</span></a> </span>
</span>
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">
一节。</span></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: 0cm; margin-left: 36.0pt">
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black"> </span></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: 0cm; margin-left: 36.0pt">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">
如果错误信息中没有附加“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">***</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">”字符串,则是子过程的调用失败,如果</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">中此命令有前缀“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">-</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">”,</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; color: black">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312; color: black">会忽略这个错误。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.1pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<b>
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial; color: blue">
missing separator. Stop.</span></b></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.1pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<b>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -