undefined versioned symbol name std::time_put_w@@GLIBCPP_3.2
Nick NoSpam
nicknospam@optonline.net
Fri Oct 22 16:26:00 GMT 2004
[Note to self: 3 proofreads isn't enough at 2:30 AM]
Forgot to mention, the error is puzzling me because my code doesn't call
any time functions. That being the case, why is this
symbol--std::time_put_w--singled out? I don't receive any other errors.
Regards,
Nick G.
On Fri, 2004-10-22 at 02:32, Nick NoSpam wrote:
> 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.
>
More information about the Gcc
mailing list