Spurious undefined reference error?
Dan Kegel
dank@kegel.com
Thu Dec 20 19:22:00 GMT 2012
More information about the Binutils mailing list
Thu Dec 20 19:22:00 GMT 2012
- Previous message (by thread): PATCH: Fix and use elf_append_rel
- Next message (by thread): Spurious undefined reference error?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The command (sanitized) g++ -Wl,--verbose -v -pthread videos.C -Wl,-rpath,/opt/foo/bar/lib -L/opt/foo/bar/lib \ -lxxx3 -lxxx6++ -llxxx7++ -lxxx6 -lxxx7 ../xxx8/xxx8.a -o videos fails for me with found libxxx6++.so at /opt/foo/bar/lib/libxxx6++.so /usr/local/bin/ld: /opt/foo/bar/lib/libxxx3.so: undefined reference to symbol 'foo::xxx6::bletch() const' /usr/local/bin/ld: note: 'foo::xxx6::bletch() const' is defined in DSO /opt/foo/bar/lib/libxxx6++.so so try adding it to the linker command line The commandline g++ -Wl,--verbose -v -pthread videos.C -Wl,-rpath,/opt/foo/bar/lib -L/opt/foo/bar/lib \ -lxxx3 -lxxx6++ -llxxx7++ -lxxx6 -lxxx7 ../xxx8/xxx8.a /opt/foo/bar/lib/libxxx6++.so -o videos works. Why, if it was able to find the library, can't it use it without an absolute path? ld --version says 2.22; this is the stock linker on ubuntu 12.04 x86-64. (Building a fresh binutils-2.23 from source in /usr/local doesn't seem to help.... probably because even /usr/local/bin/ld --version still says 2.22 then, so evidently it's not that easy to replace binutils. A clue on how to gather more info would be appreciated.)
- Previous message (by thread): PATCH: Fix and use elf_append_rel
- Next message (by thread): Spurious undefined reference error?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list