上次安装Xapian的时候我们说编译一个xapian的C++程序时总是说"undefined reference to xxx".其实我们仔细观察在./configure xapian-core的时候有这么一句:nothing to be done for all,然后在make的时候也有:nothing to be done for all,nothing to be done for all-am。
这句提示是说明你已经编译好了,而且没有对代码进行任何改动。
make clean 清除安装时留下的文件
再运行一下ldconfig, 更新链接库缓存。
本文将详细解释在编译Xapian的C++程序时遇到undefined reference to xxx错误的原因及解决方法。通过观察./configure xapian-core时的提示nothing to be done for all,理解编译状态,并指导读者如何清理安装文件、运行ldconfig以更新链接库缓存。
7万+

被折叠的 条评论
为什么被折叠?



