Thread overview | |||||
---|---|---|---|---|---|
|
March 10, 2013 undefined reference to `pantheios_log_3_no_test' | ||||
---|---|---|---|---|
| ||||
Hi, I have a whole bunch of projects using Pantheios, but one of them fails to link on Linux with gcc4.6 with the following error: 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 I'm linking with: 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 Please advise, Thanks, Adi |
March 15, 2013 Re: undefined reference to `pantheios_log_3_no_test' | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adi | Adi Glad we sorted it out. Would you mind adding in details of the fix to the Pantheios Help forum, and then posting a link to that in this ng? Thanks Matt "Adi" <uknowme@somewhere.com> wrote in message news:mkmybpvctxqkzhrxyvdi@forum.dlang.org... > Hi, > > I have a whole bunch of projects using Pantheios, but one of > them fails to link on Linux with gcc4.6 with the following error: > > 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 > > > I'm linking with: > 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 > > Please advise, > Thanks, > Adi |
March 15, 2013 Re: undefined reference to `pantheios_log_3_no_test' | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matt Wilson | Turns out that in gcc, symbols are only linked forward, so dependent symbols in a given lib will only be resolved from the libs that follow it in the link list. See here <http://stackoverflow.com/questions/45135/linker-order-gcc> for some more details. By moving other statically linked libs to before Pantheios, the linker succeeded. Thanks Matt! ref: - http://stackoverflow.com/questions/15321970/undefined-reference-to-pantheios-log-3-no-test - https://sourceforge.net/projects/pantheios/forums/forum/475313/topic/6975104/index/page/1 On Friday, 15 March 2013 at 02:14:34 UTC, Matt Wilson wrote: > Adi > > Glad we sorted it out. Would you mind adding in details of the fix to the > Pantheios Help forum, and then posting a link to that in this ng? > > Thanks > > Matt > > "Adi" <uknowme@somewhere.com> wrote in message > news:mkmybpvctxqkzhrxyvdi@forum.dlang.org... >> Hi, >> >> I have a whole bunch of projects using Pantheios, but one of >> them fails to link on Linux with gcc4.6 with the following error: >> >> 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 >> >> >> I'm linking with: >> 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 >> >> Please advise, >> Thanks, >> Adi |
Copyright © 1999-2021 by the D Language Foundation