Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   /usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostre (http://www.velocityreviews.com/forums/t452395-usr-bin-ld-dist-lib-libjsdombase_s-a-blockgrouper-o-text-0x98-unresolvable-relocation-against-symbol-std-basic_ostream-char-std-char_traits-char-and-std-endl-char-std-char_traits-char-std-basic_ostre.html)

silverburgh.meryl@gmail.com 03-08-2006 03:39 PM

/usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostre
 
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<char> >& std::endl<char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&)@@GLIBCXX_3.4'



Thank for your any idea.


Victor Bazarov 03-08-2006 03:48 PM

Re: /usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98):
 
silverburgh.meryl@gmail.com wrote:
> 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<char> >& std::endl<char, std::char_traits<char>
>
>>(std::basic_ostream<char, std::char_traits<char> >&)@@GLIBCXX_3.4'

>
>
>
> 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
--
Please remove capital As from my address when replying by mail

Marcus Kwok 03-08-2006 04:08 PM

Re: /usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_o
 
silverburgh.meryl@gmail.com <silverburgh.meryl@gmail.com> wrote:
> 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<char> >& std::endl<char, std::char_traits<char>
>>(std::basic_ostream<char, std::char_traits<char> >&)@@GLIBCXX_3.4'

>
>
> 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>.

--
Marcus Kwok

Larry I Smith 03-09-2006 12:14 AM

Re: /usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98):
 
Marcus Kwok wrote:
> silverburgh.meryl@gmail.com <silverburgh.meryl@gmail.com> wrote:
>> 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<char> >& std::endl<char, std::char_traits<char>
>>> (std::basic_ostream<char, std::char_traits<char> >&)@@GLIBCXX_3.4'

>>
>> 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>.
>


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


All times are GMT. The time now is 10:04 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.