Linux ppc64 - compatibility-ldbl.o can't find std::num_put
Peter Bergner
bergner@linux.ibm.com
Fri Apr 12 23:22:00 GMT 2019
On 4/12/19 3:55 PM, Brian Groose wrote:
> The only linker options I'm using besides -L and -l are
> -Wl,-z,noexecstack -static-libgcc -static-libstdc++. If I remove
> -static-libstdc++ it links successfully.
Symbol resolution for static archives is different than for shared libs.
When the linker processes libfoo.a, it is only used satisfy undefined
symbols at that point. If after libfoo.a on the linker command, you
have another object file or library that needs a symbol supplied by
libfoo.a, then you'll need to place libfoo.a after those files...or
just use it again. Eg:
ld a.o b.o libfoo.a c.o d.o libfoo.a
or ld a.o b.o -lfoo c.o d.o -lfoo
Does adding another use of -lstdc++ on your linker command line help?
Use gcc -v ... to see the actual linker command executed.
Peter
More information about the Gcc-help
mailing list