【发布时间】:2011-04-09 05:02:44
【问题描述】:
最近我在 XNA 和 AssemblyInfo 源文件中构建了一个游戏,我可以将 AssemblyVersion 设置为 x.x.*,它将构建和修订设置为项目编译的日期和时间。我现在正在用 C++ 做一个项目,我想知道如何复制该功能。两者都是为了让 exe 文件显示该版本以及我可以通过编程方式获取它的方式。谢谢。
【问题讨论】:
标签: c# c++ visual-studio visual-studio-2010
最近我在 XNA 和 AssemblyInfo 源文件中构建了一个游戏,我可以将 AssemblyVersion 设置为 x.x.*,它将构建和修订设置为项目编译的日期和时间。我现在正在用 C++ 做一个项目,我想知道如何复制该功能。两者都是为了让 exe 文件显示该版本以及我可以通过编程方式获取它的方式。谢谢。
【问题讨论】:
标签: c# c++ visual-studio visual-studio-2010
【讨论】:
我相信添加 DATE 宏是一个很好的解决方案。
The compilation date of the current source file. The date is a string literal of the form Mmm dd yyyy. The month name Mmm is the same as for dates generated by the library function asctime declared in TIME.H.
【讨论】: