Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

bool std::operator==<char,std::char_traits........ undefined symbol error

807575May 28 2009 — edited Jul 7 2009
Hi

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2009
Added on May 28 2009
4 comments
543 views