J
JohnC
Hello people...
Just for clarification, I'm a C++ newbie, and not really into
programming in C++. I was trying to get
an open source C++ program to compile (the author didn't respond yet)
and get the following problem:
In 'string.h' (included with the program):
line 47:
extern char *strcasestr(const char *haystack, const char *needle);
In 'string.cpp' (again, included)
line 30:
char *strcasestr(const char *haystack, const char *needle);
line 224:
char *strcasestr(const char *haystack, const char *needle)
{..code of the function... No exception is defined...}
Compiling this gives:
Compiling module string.o
string.cpp:30: error: declaration of ‘char* strcasestr(const char*,
const char*)’ throws different exceptions
../include/string.h:47: error: from previous declaration ‘char*
strcasestr(const char*, const char*) throw ()’
string.cpp: In function ‘char* strcasestr(const char*, const char*)’:
string.cpp:224: error: declaration of ‘char* strcasestr(const char*,
const char*)’ throws different exceptions
string.cpp:30: error: from previous declaration ‘char*
strcasestr(const char*, const char*) throw ()’
I'm guessing this is a compatibility problem with another definition
of strcasestr (probably in the C libraries), but I'm not sure... But
why isn't this signaled? The errors blame only internal declaration
conflicts...
Thanks for any suggestion!
John
Just for clarification, I'm a C++ newbie, and not really into
programming in C++. I was trying to get
an open source C++ program to compile (the author didn't respond yet)
and get the following problem:
In 'string.h' (included with the program):
line 47:
extern char *strcasestr(const char *haystack, const char *needle);
In 'string.cpp' (again, included)
line 30:
char *strcasestr(const char *haystack, const char *needle);
line 224:
char *strcasestr(const char *haystack, const char *needle)
{..code of the function... No exception is defined...}
Compiling this gives:
Compiling module string.o
string.cpp:30: error: declaration of ‘char* strcasestr(const char*,
const char*)’ throws different exceptions
../include/string.h:47: error: from previous declaration ‘char*
strcasestr(const char*, const char*) throw ()’
string.cpp: In function ‘char* strcasestr(const char*, const char*)’:
string.cpp:224: error: declaration of ‘char* strcasestr(const char*,
const char*)’ throws different exceptions
string.cpp:30: error: from previous declaration ‘char*
strcasestr(const char*, const char*) throw ()’
I'm guessing this is a compatibility problem with another definition
of strcasestr (probably in the C libraries), but I'm not sure... But
why isn't this signaled? The errors blame only internal declaration
conflicts...
Thanks for any suggestion!
John