Hi,

I am trying to create a C++ library and when doing a linking I am getting the
following error.

Here is the command

g++ -static -static-libgcc -Wl,-bexpfull,-bnoentry,-brtl -o libAllocation.so
*.o -L/vol.rtk/compilers/aix5.1.gcc-3.3/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3
-lgcc -lstdc++ -lc -lm

The error reported is 

ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::size() const
ld: 0711-317 ERROR: Undefined symbol: .std::allocator<char>::allocator()
ld: 0711-317 ERROR: Undefined symbol: .std::allocator<char>::~allocator()
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::c_str() const
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.


When I am using the -bnoquiet option addition messages for error

ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::size() const
 .std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::size() const[2]     ER PR VersionUtil.cpp(VersionUtil.o)
                                   0000002c .text    R_RBR    [22]   
.VersionUtil::getRevision(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
                                   000000dc .text    R_RBR    [24]   
.VersionUtil::getModtime(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
ld: 0711-317 ERROR: Undefined symbol: .std::allocator<char>::allocator()
 .std::allocator<char>::allocator()[70]    ER PR
casepack_cp_heur.cpp(casepack_cp_heur.o)
                                   00012154 .text    R_RBR    [594]  
.casePackAllocation_CP(bool, int, int, int, double**, double**, bool, int**,
int**, int**, int**, int*, int**, int**, int*, bool&, int*, int*, double*)
 .std::allocator<char>::allocator()[8]     ER PR VersionUtil.cpp(VersionUtil.o)
                                   000001c0 .text    R_RBR    [26]   
.VersionUtil::getArchive(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
                                   000002c4 .text    R_RBR    [26]   
.VersionUtil::getArchive(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)


Could you please let me know what needs to be done to solve this error.

Thanks
Dham


-- 
           Summary: Error when linking. Trying to create a library
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dams_napp at hotmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30504

Reply via email to