这是一个非常奇怪的问题。我正在 Solaris 10 上使用 cc“Sun C 5.7 2005/01/07”和 Bison 1.25(如果重要的话)编译一个 C++ 项目。最终构建库后,它仍然无法链接可执行文件,并显示以下错误消息:
Undefined first referenced symbol in file PointZERO /export/build/proj/lib/libMainLib.so ld: fatal: Symbol referencing errors. No output written to bin/the_exe
有人知道这个“PointZERO”符号吗?它不在我的代码中;我的任何库中也不包含该字符串。我以前从未见过这个名字。而且我还没有在 Google 上找到任何关于此的信息...
最佳答案
好吧,哎哟...错误是由其中一个源文件中的#include <...> 语句引起的,该文件(出于未知原因)用于包含来自完全不同项目的文件。
出于多种原因非常尴尬。经验教训:在 checkin 之前进行更彻底的代码审查。
关于c++ - Sun CC : where does symbol "PointZERO" come from? 它不在我的源代码中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1438668/