clang

ERROR/BUG合集记录

好久不见. 提交于 2020-10-15 06:25:39
发现自己经常遇到似曾相识的bug,却记不起来上一次是如何修复的。此文章用来记录自己的常见bug,原因,以及是怎么修好的。 linker command failed: linking出了问题,这里是因为register_all()的declaration和definition是分开的,definition所在的object file(.o)在makefile中没有作为source file被链接。(我使用的 +=xx.o 不知道为什么失效了) Undefined symbols for architecture x86_64: “register_all()”, referenced from: _main in test_accuracy-0f5cb0.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [test_accuracy] Error 1 这是从stack overflow找到的Error 127的解释:Error 127 means one of two things: file not found; the path you’re