“对'pantheios_log_3_no_test'的未定义引用”

时间:2013-03-10 12:01:04

标签: gcc linker-errors ld pantheios

我在使用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.a
  • libpantheios.1.fe.simple.gcc46.mt.a
  • libpantheios.1.be.fprintf.gcc46.mt.a
  • libpantheios.1.bec.fprintf.gcc46.mt.a
  • libpantheios.1.util.gcc46.mt.a
  • libpantheios.1.appl.gcc46.mt.a
  • libpantheios.1.core.gcc46.mt.a

pantheios_log_3_no_test在哪里?
我错过了什么?

1 个答案:

答案 0 :(得分:0)

事实证明,在gcc中,符号只是向前链接,因此给定lib中的相关符号只能从链接列表中跟随它的库中解析。有关详细信息,请参阅here 通过在 Pantheios之前将其他静态链接的库移动到,链接器成功。