错误C3861:"strcasecmp":在Visual Studio 2008中找不到标识符吗? [英] error C3861: 'strcasecmp': identifier not found in visual studio 2008?

查看:709
本文介绍了错误C3861:"strcasecmp":在Visual Studio 2008中找不到标识符吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将应用程序从cygwin移植到Visual Studio 2008 Express
但我收到此错误:

im trying to port application from cygwin to visual studio 2008 express
but im getting this error :

error C3861: 'strcasecmp': identifier not found  

在这种类型的代码中:

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

vs中的替代品是什么?我在网上找不到任何东西

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

推荐答案

将其添加到预编译的标头(或其他一些config.h)中

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

这篇关于错误C3861:"strcasecmp":在Visual Studio 2008中找不到标识符吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆