W
wentaozhou
Hi all,
I encounter a problem when compiling in Ubuntu a c++ code wrote
originally also in linux environment. It seems to be the problem of
standard template library but I totally don't know how to handle it.
Could anybody help me out?
Below please see the error message:
.......
block.cpp.gnu.linkonce.t._ZN6lembsk5FieldISt6vectorINS_5PointESaIS2_EEE7setsizeEiiii+0x5ca):
undefined reference to `std::__default_alloc_template<true,
0>::_S_free_list'
block.cpp.gnu.linkonce.t._ZN6lembsk5FieldISt6vectorINS_5PointESaIS2_EEE7setsizeEiiii+0x5d8):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
block.cpp.gnu.linkonce.t._ZN6lembsk5FieldISt6vectorINS_5PointESaIS2_EEE7setsizeEiiii+0x5ea):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
.../../lembsk/liblembsk.a(block.o): In function `void
std::_Construct<std::vector<double, std::allocator<double> >,
std::vector<double, std::allocator<double> > >(std::vector<double,
std::allocator<double> >*, std::vector<double, std::allocator<double> >
const&)':
block.cpp.gnu.linkonce.t._ZSt10_ConstructISt6vectorIdSaIdEES2_EvPT_RKT0_+0x40):
undefined reference to `std::__default_alloc_template<true,
0>::allocate(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [lembsk] Error 1
make[2]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized'
make: *** [all] Error 2
Thanks so much!
Vito
I encounter a problem when compiling in Ubuntu a c++ code wrote
originally also in linux environment. It seems to be the problem of
standard template library but I totally don't know how to handle it.
Could anybody help me out?
Below please see the error message:
.......
block.cpp.gnu.linkonce.t._ZN6lembsk5FieldISt6vectorINS_5PointESaIS2_EEE7setsizeEiiii+0x5ca):
undefined reference to `std::__default_alloc_template<true,
0>::_S_free_list'
block.cpp.gnu.linkonce.t._ZN6lembsk5FieldISt6vectorINS_5PointESaIS2_EEE7setsizeEiiii+0x5d8):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
block.cpp.gnu.linkonce.t._ZN6lembsk5FieldISt6vectorINS_5PointESaIS2_EEE7setsizeEiiii+0x5ea):
undefined reference to `std::__default_alloc_template<true,
0>::_S_node_allocator_lock'
.../../lembsk/liblembsk.a(block.o): In function `void
std::_Construct<std::vector<double, std::allocator<double> >,
std::vector<double, std::allocator<double> > >(std::vector<double,
std::allocator<double> >*, std::vector<double, std::allocator<double> >
const&)':
block.cpp.gnu.linkonce.t._ZSt10_ConstructISt6vectorIdSaIdEES2_EvPT_RKT0_+0x40):
undefined reference to `std::__default_alloc_template<true,
0>::allocate(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [lembsk] Error 1
make[2]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/vito/_research_stanford/code/lembsk/Optimized'
make: *** [all] Error 2
Thanks so much!
Vito