且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 VS 2010 中继承 C++ 项目属性

更新时间:2023-02-15 14:53:19

为了创建可继承的属性,您必须创建一个新的属性表,将其保存在本地位置,并让您希望使用这些属性的任何项目(继承) 它通过添加现有"表.

In order to create inheritable properties you must create a new property sheet, save it in a local location and have any projects you want to have those properties use (inherit) it by "Add Existing" sheet.

属性表的列出顺序很重要.如果该属性被列为使用默认值或从父级继承",它将从其正下方的属性表中获取值,如果其下方没有属性表,则将使用默认值.

The order of the listing of property sheets matters. If the property is listed as "Use default or inherit from parent" it will get the value from the property sheet directly below it or if there is none below it, it will use the default.

属性表管理器中列出的表只是链接.如果文件链接到多个配置并且您将其更改为一个,则所有链接的配置都将接受更改.因此,如果您想对每个 Config 进行不同的更改.对于相同的属性,您必须制作单独的表格.

The sheets listed in the property sheet manager are just links. If the file is linked to multiple Configurations and you change it in one, ALL linked configurations will accept the changes. Therefore if you want to make different changes for each Config. for the same property you must make separate sheets.