开发者

error C3861: 'strcasecmp': identifier not found in visual studio 2008?

开发者 https://www.devze.com 2023-01-15 15:17 出处:网络
im trying to port application from cygwin to visual studio 2008 express but i开发者_Python百科m getting this error :

im trying to port application from cygwin to visual studio 2008 express

but i开发者_Python百科m getting this error :

error C3861: 'strcasecmp': identifier not found  

in this type of code:

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

what is the replacement in vs? i can't find any thing in the net


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

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


Look for

int _stricmp(
   const char *string1,
   const char *string2 );
0

精彩评论

暂无评论...
验证码 换一张
取 消