bool std::operator==<char,std::char_traits........ undefined symbol error
807575May 28 2009 — edited Jul 7 2009Hi
I saw some issues related with this error in forum but this error is a little bit different from others I think. when I compile my code in OPTIMIZE (release) mode, there is nothing wrong. it can be compiled. but when i try to compile in debug mode (compiling with -g flag) compilation throws
Undefined first referenced
symbol in file
bool std::operator==<char,std::char_traits<char>,std::allocator<char> >(const std::basic_string<__type_0,__type_1,__type_2>&,const __type_0*) /dev/aykut/src/aaa.o
bool std::operator==<char,std::char_traits<char>,std::allocator<char> >(const __type_0*,const std::basic_string<__type_0,__type_1,__type_2>&) /dev/aykut/src/bbb.o
errors. I compiled with stlport4 library but in this time, some definitions cant be found like
Error: The function "strlen" must have a prototype.
Error: The function "strcasecmp" must have a prototype.
libCstd has ignored I think.
what is the reason of these errors ?
System info :
CC -V
CC: Sun C++ 5.8 Patch 121017-19 2009/03/12
uname -a
SunOS hitit 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-250