This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

undefined versioned symbol name std::time_put_w@@GLIBCPP_3.2


Apologies if this is the wrong list.

I'm trying to generate a shared object that statically links libc,
libstdc++, and libgcc, but I'm receiving the error: undefined versioned
symbol name std::time_put_w@@GLIBCPP_3.2.

The reason I'm bringing this up on this list is because:
  nm `gcc -print-file-name=libstdc++.a` | grep
"time_put_w@@GLIBCPP_3\.2"
finds a match.

The source is very simple:
test2.h:
  #include <string>

  class exception_two
  {
  public:
     exception_two(std::string s) : m_sMsg(s)
     { }

     virtual ~exception_two() { }

     virtual const char* what() const
     {
        return(m_sMsg.c_str() );
     }

  protected:
     std::string m_sMsg;
  };

  class test_two
  {
  public:
     test_two();
     virtual ~test_two();

     void print(std::string s);
  };


test2.cpp:
  #include "test2.h"
  #include <iostream>

  using namespace std;

  test_two::test_two()
  {
  }

  test_two::~test_two()
  {
  }

  void test_two::print(std::string s)
  {
     cout << "This is the test_two class: '" << s << "'" << endl;
     throw(exception_two(s) );
  }


Compiled with:
   g++ -c -g -fexceptions -fPIC test2.cpp -o test2.o

And tried to create a shared object with:
   g++ -g -fexceptions -fPIC -nodefaultlibs -shared -o libtest2.so
test2.o \
   `gcc -print-file-name=libstdc++.a` \
   -lm \
   /usr/lib/libc.a \
   `gcc -print-file-name=libgcc_eh.a` \
   `gcc -print-libgcc-file-name`


I searched for this problem, but didn't find anything helpful.

I appreciate any and all suggestions.

Regards,
Nick G.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]