AddCommonConfig

向项目中添加默认配置。

function AddCommonConfig( 
   oProj, 
   strProjectName  
);

参数

  • oProj
    选定的项目。

  • strProjectName
    项目的名称。

备注

调用该函数将默认代码模型配置添加到向导创建的项目中。 可以指定“Release”配置,也可以指定“Debug”配置。 下表列出每种配置类型的代码模型对象的默认属性设置。

Visual C++ 编译器工具对象

对象属性

“Release”配置设置

“Debug”配置设置

UsePrecompiledHeader

pchUseUsingSpecific

pchUseUsingSpecific

WarningLevel

3

3

MinimalRebuild

不适用

true

DebugInformationFormat

debugEnabled

debugEditAndContinue

Optimization

optimizeMaxSpeed

不适用

BasicRuntimeChecks

不适用

runtimeBasicCheckAll

Detect64BitPortabilityProblems

true

true

OmitFramePointers

true

不适用

EnableFunctionLevelLinking

true

不适用

StringPooling

true

不适用

Visual C++ Configuration 对象

对象属性

“Release”配置设置

“Debug”配置设置

IntermediateDirectory

Release

Debug

OutputDirectory

Release

Debug

Visual C++ 链接器工具对象

对象属性

“Release”配置设置

“Debug”配置设置

SubSystem

subSystemWindows

subSystemWindows

TargetMachine

machineX86

machineX86

GenerateDebugInformation

true

true

示例

// Create the Visual C++ project.
selProj = CreateProject(strProjectName, strProjectPath);
// Add the common configuration to the project.
   AddCommonConfig(selProj, strProjectName);
   selProj.Object.keyword = "MyProj";

请参见

任务

创建自定义向导

概念

用公共 JScript 函数自定义 C++ 向导

设计向导

其他资源

用于 C++ 向导的 JScript 函数