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

Discussion in 'C++' started by silverburgh.meryl@gmail.com, Mar 8, 2006.

  1. Guest

    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.
    , Mar 8, 2006
    #1
    1. Advertising

  2. Re: /usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98):

    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
    Victor Bazarov, Mar 8, 2006
    #2
    1. Advertising

  3. Marcus Kwok Guest

    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

    <> 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
    Marcus Kwok, Mar 8, 2006
    #3
  4. Re: /usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98):

    Marcus Kwok wrote:
    > <> 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
    Larry I Smith, Mar 9, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Salerno
    Replies:
    30
    Views:
    1,943
    Stephan Kuhagen
    Aug 10, 2006
  2. Yves Dorfsman

    #!/usr/bin/env python vs. #!/usr/bin/python

    Yves Dorfsman, May 2, 2008, in forum: Python
    Replies:
    27
    Views:
    1,975
    Tim Roberts
    May 10, 2008
  3. anne001
    Replies:
    1
    Views:
    404
  4. Sara
    Replies:
    3
    Views:
    435
  5. Gilles
    Replies:
    7
    Views:
    546
    Matej Cepl
    Sep 30, 2012
Loading...

Share This Page