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