_stricmp与mingw和c ++ 0x不存在? [英] _stricmp with mingw and c++0x not existent?

查看:268
本文介绍了_stricmp与mingw和c ++ 0x不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前尝试使用googletest与MinGW和 -std = c ++ 0x ,但它抱怨 _stricmp没有声明在这个范围,它不会,当我不使用 -std = c ++ 0x
我不知道 _stricmp 是什么,我刚刚发现它是在 cstring / string.h

I'm currently trying to use googletest with MinGW and -std=c++0x but it complains that _stricmp is not declared in this scope which it doesn't when I do not use -std=c++0x. I have no idea what _stricmp is, I just found out that it is defined in cstring/string.h, so why is it gone in C++0x?

推荐答案

-std = c ++ 0x 选项导致g ++进入'strict ANSI'模式,因此它不声明非标准函数(和 _stricmp() is非标准 - 它只是 strcmp()的版本,不区分大小写。)

The -std=c++0x option causes g++ to go into 'strict ANSI' mode so it doesn't declare non-standard functions (and _stricmp() is non-standard - it's just a version of strcmp() that's case-insensitive).

使用 -std = gnu ++ 0x

这篇关于_stricmp与mingw和c ++ 0x不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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