如何在Visual C ++中小写环境变量? [英] How do you lowercase environment variables in Visual C++?

查看:95
本文介绍了如何在Visual C ++中小写环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从Visual C ++项目设置中减小小写的环境变量,例如$(TargetName)$(ConfigurationName)等,而不必将它们指定为新的环境变量.我想将所有内容都保持小写,以匹配我的unix版本.

Is it possible to lower case environment variables from Visual C++ project settings e.g. $(TargetName), $(ConfigurationName) etc without having to specify these as new environment variables. I would like to keep everything lower case to match my unix builds.

谢谢

推荐答案

是的,有可能!

只需使用$(MacroName.toLower())$(MacroName.toUpper()).

例如:

$(Configuration) == Debug

$(Configuration.toLower()) == debug

$(Configuration.toUpper()) == DEBUG

此功能自Visual Studio 2017起有效,但是无法确定它是否适用于较早版本.

This works as of Visual Studio 2017, can't tell if it does for older versions, though.

这篇关于如何在Visual C ++中小写环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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