You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
第一次执行make -s test报错及其解决办法,mv: cannot stat '/ucl': No such file or directory
在书(C 编译器剖析,邹昌伟)的第 23 页中第一次执行make -s test时,报错内容如下:
[oxygen@****** ucc]$ make -s test
(exprchk.c,314):(output.c,70):warning:Too many arguments
(exprchk.c,314):(output.c,86):warning:Too many arguments
mv: cannot stat '/ucl': No such file or directory
make[1]: *** [Makefile:21: test] Error 1
make: *** [Makefile:25: test] Error 2
[oxygen@****** ucc]$ make -s test
(exprchk.c,314):(output.c,70):warning:Too many arguments
(exprchk.c,314):(output.c,86):warning:Too many arguments
(exprchk.c,314):(output.c,70):warning:Too many arguments
(exprchk.c,314):(output.c,86):warning:Too many arguments
第一次执行make -s test报错及其解决办法,mv: cannot stat '/ucl': No such file or directory
在书(C 编译器剖析,邹昌伟)的第 23 页中第一次执行
make -s test
时,报错内容如下:问题原因:多级 makefile 及参数传递问题,ucc/Makefile 文件中的变量 $(UCCDIR) 没有传递到 ucc/ucl/Makefile 中,导致报错。
解决办法:将 ucc/Makefile 文件的UCCDIR定义前加 export
正确的 ucc/Makefile 文件如下:
修改后重新执行,结果如下
可能对你有帮助的 makefile 相关代码:
1.打印当前Makefile的路径:
2.在控制台输出变量 $(UCCDIR)/ucl 的值
希望能帮助到有需要的人!
The text was updated successfully, but these errors were encountered: