undeclared function

Jackie Chang jchang@eitc.epson.com
Mon Oct 1 09:49:00 GMT 2001


Hi:
In RedHat 7.0, I got the following error messages 
when I compile *.cpp files.
 
'strcasestr' undeclared (first use this 
function)
'exit' undeclared (first use this 
function)
 
The same code was compiled OK under RedHat6.2 
environment.
 
So I wrote a simple testing code as followings, and 
save it to main.c and main.cpp.
 
#include <unistd.h>
#include <string.h>
 
int main()
{
   if (strcasestr("mytest", 
"myTest"))
     sleep(30);
   exit(1);
}
 
gcc main.c  ---> OK
g++ main.cpp ---> Get the undeclared error 
messages
 
Any idea what cause the problem?
 
I have try to upgrade my gcc, cpp , gcc-c++ package from redhat's 
rawhide dir.  But I ran into a lot of dependency problems.  I don't 
dare to forcely install glibc* and glib* rpm since I am afraid that my system 
may not be able to run after the libc* get changed.
When I try to change the ld-linux.so to link to different ld version, my 
system stop working. Can you tell me how to upgrade those 
packages? Thanks, Jackie



More information about the Libstdc++ mailing list