在使用gcc4.6连接Linux上的Pantheios时,我遇到了问题,有以下错误:
In function `pantheios::internal::log_dispatch_3(int, unsigned int, char const*, unsigned int, char const*, unsigned int, char const*)':
sig_writing_sink.cpp:(.text._ZN9pantheios8internal14log_dispatch_3EijPKcjS2_jS2_[pantheios::internal::log_dispatch_3(int, unsigned int, char const*, unsigned int, char const*, unsigned int, char const*)]+0x6d): undefined reference to `pantheios_log_3_no_test'
collect2: ld returned 1 exit status我与以下方面有联系:
libpantheios.1.core.gcc46.mt.alibpantheios.1.fe.simple.gcc46.mt.alibpantheios.1.be.fprintf.gcc46.mt.alibpantheios.1.bec.fprintf.gcc46.mt.alibpantheios.1.util.gcc46.mt.alibpantheios.1.appl.gcc46.mt.alibpantheios.1.core.gcc46.mt.apantheios_log_3_no_test在哪里?
我遗漏了什么?
发布于 2013-03-12 07:29:16
结果发现,在gcc中,符号只向前链接,所以给定库中的相依符号只能从链接列表中跟随它的lib中解析。有关更多细节,请参见here。
通过将其他静态链接库移动到Pantheios之前,链接器成功了。
https://stackoverflow.com/questions/15321970
复制相似问题