gcc max.o后有問題
gcc -c max.c -o max.o?
再gcc max.o hello.c 就出現下面的錯誤
warning: implicit declaration of function ‘max’; did you mean ‘main’? [-Wimplicit-function-declaration]
? ? ?int maxNum=max(a1,a2);
gcc -c max.c -o max.o?
再gcc max.o hello.c 就出現下面的錯誤
warning: implicit declaration of function ‘max’; did you mean ‘main’? [-Wimplicit-function-declaration]
? ? ?int maxNum=max(a1,a2);
2019-09-02
舉報
2020-03-22
我跟你的問題一樣,但我有個猜想,你可以認證一下。老師前一張說新的gcc版本會自動補全一次include"max.c",老版本就不會,所以這里是不是需要我們在主函數加一個#include<max.o>或者max.c?雖然感覺并不是這么個問題
2019-09-14
里面的代碼?
2019-09-07
叫你不認真看 現在不知道了吧 我也不知道