/usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation ag

  • Thread starter silverburgh.meryl
  • Start date
S

silverburgh.meryl

I have this linker error, and I would need some help in resolving it:

I have put "#include <iostream>" in my .cpp. I am not sure why I can't
link. It compiles fine.

/usr/bin/ld:
.../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98):
unresolvable relocation against symbol `std::basic_ostream<char,
std::char_traits said:
(std::basic_ostream<char, std::char_traits<char> >&)@@GLIBCXX_3.4'


Thank for your any idea.
 
V

Victor Bazarov

I have this linker error, and I would need some help in resolving it:

I have put "#include <iostream>" in my .cpp. I am not sure why I can't
link. It compiles fine.

/usr/bin/ld:
../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98):
unresolvable relocation against symbol `std::basic_ostream<char,




Thank for your any idea.

Here is an idea: linking (and especially such thing like "[un]resolvable
relocation") is not really part of C++ either since it's platform-
specific, so consider asking in the newsgroup for your platform. Also,
try reading the documentation provided with your linker about this error
message. If you are using GCC, try asking in their online forums on in
'gnu.gcc.help'.

V
 
M

Marcus Kwok

I have this linker error, and I would need some help in resolving it:

I have put "#include <iostream>" in my .cpp. I am not sure why I can't
link. It compiles fine.

/usr/bin/ld:
../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98):
unresolvable relocation against symbol `std::basic_ostream<char,



Thank for your any idea.

std::endl is found in <ostream>, though several implementations will
implicitly #include <ostream> in <iostream>. Try explicitly
#include'ing <ostream>.
 
L

Larry I Smith

Marcus said:
std::endl is found in <ostream>, though several implementations will
implicitly #include <ostream> in <iostream>. Try explicitly
#include'ing <ostream>.

and do not link with 'ld' directly; use 'g++' to do the link.
g++ adds additional data (like the C++ libs, and C++ specific
link switches) then invokes 'ld' for you.

Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top