Error C3861: 'strcasecmp': identifier not found in Visual Studio 2008?

im trying to port an application from cygwin to visual studio 2008 express
but I get this error:

error C3861: 'strcasecmp': identifier not found 

in this type of code:

 if (!strcasecmp("A0", s)) .... 

What is a replacement in vs? I can not find anything on the net

+7
visual-studio-2008 cygwin porting
source share
2 answers

add this to your precompiled header (or other config.h file)

 #ifdef _MSC_VER //not #if defined(_WIN32) || defined(_WIN64) because we have strncasecmp in mingw #define strncasecmp _strnicmp #define strcasecmp _stricmp #endif 
+18
source share

Look for

 int _stricmp( const char *string1, const char *string2 ); 
+7
source share

All Articles