更新时间:2022-03-25 07:44:14
这是一个链接错误。 LD
是连接器,所以如果你用LD返回退出状态1结尾的错误信息,告诉你,这是一个链接错误。
It's a linker error. ld
is the linker, so if you get an error message ending with "ld returned 1 exit status", that tells you that it's a linker error.
该错误消息告诉你,没有你链接到的目标文件包含 avergecolumns
的定义。其原因是,你所定义的函数被调用 averagecolumns
(换句话说:调用的函数(和presumably当你拼错函数名头文件,以及 - 否则你不得不在编译时))得到一个不同的错误
The error message tells you that none of the object files you're linking against contains a definition for avergecolumns
. The reason for that is that the function you've defined is called averagecolumns
(in other words: you misspelled the function name when calling the function (and presumably in the header file as well - otherwise you'd have gotten a different error at compile time)).