制作:*** []错误1 [英] Make: *** [] Error 1
本文介绍了制作:*** []错误1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做了一个makefile,我试图对其进行测试,但我在化妆得到一个错误:
I've made a makefile and am trying to test it but am getting an error in make:
austins-macbook:work4 staffmember$ make new
rm -f main.o heap.o heap
gcc -Wall -O2 -c -o main.o main.c
gcc -Wall -O2 -c -o heap.o heap.c
heap.c: In function ‘createHeap’:
heap.c:6: warning: implicit declaration of function ‘malloc’
heap.c:6: warning: incompatible implicit declaration of built-in function ‘malloc’
heap.c:8: warning: implicit declaration of function ‘exit’
heap.c:8: warning: incompatible implicit declaration of built-in function ‘exit’
gcc -Wall -O2 -o heap main.o heap.o
austins-macbook:work4 staffmember$ make test
./heap
make: *** [test] Error 1
我觉得越来越使的 * 的错误1,意味着你的组件之一没有正确编译,但是没有发现任何错误消息,当我编译它。我如何找出问题是什么?
I thought that getting make * Error 1 meant that one of your components did not compile properly, however there weren't any error messages when I compiled it. How do I find out what the problem is?
推荐答案
./堆
可能返回非零退出code,其中制作
是间preting为错误。请确保你正在做的返回0;
在年底主
./heap
probably returned a non-zero exit code, which make
is interpreting as an error. Make sure you are doing return 0;
at the end of main
.
这篇关于制作:*** []错误1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文