[In Solaris] How to solve undefined reference to ...

Platform:Solaris Sun OS
I use the compiler CC to compile a program ,everything goes well.However,when I changed the compiler to g++ (4.2),more than 100 error occurred.most of them are "undefined reference" error just like this:
undefined reference to `__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___I__unLink6M_v_'
TimeSpan.h:40: undefined reference to `CDateTime::toString(Date_Mode) const'

who can help me ?
thank you.
Are you linking to a C++ library or object file that was compiled with Sun Studio?
Topic archived. No new replies allowed.