C++ 编译器、语言和链接器
下列编译器、链接器、其他生成工具和 C++ 语言的功能是 Visual C++ .NET 2003 的新增功能。
编译器
Visual C++ 属性
链接器
预处理器
MASM
C++ 库
旧 iostream 库
C 运行时库
标准 C++ 库
在以前的版本中,如果 wchar_t 没有定义为本机类型,则向流的字符输入和输出可能导致存储字符或无符号短值。现在,无符号短值始终作为字符对待。
在 Visual C++ .NET 2003 中,<hash_map> 和 <hash_set> 头文件的成员不再位于 std 命名空间中,它们已被移到 stdext 命名空间。
标准 C++ 库已升级,以便利用增强 Visual C++ 编译器对 C++ 标准的支持。例如,与 Visual C++ 同时发售的标准 C++ 库实现现在利用了部分模板专用化。
ATL
将 MIDL 编译器标志更改为 /no_robust
MFC
ATL 和 MFC
-
MFC CString 类已重写为模板类 CStringT。这允许您在 ATL 项目中使用 CString,而不必链接在更大的 MFC 静态库或 DLL 中。
注意
此版本解决了知识库文章“PRB: Linking Errors When You Import CString-Derived Classes”(PRB:导入 CString 派生的类时出现的链接错误)(Q309801) 中描述的问题。可以查找 MSDN Library CD-ROM 中或 http://support.microsoft.com/default.aspx 上的知识库文章。如果在从 Visual C++ .NET 2002 的 MFC 扩展 DLL 中导出 CString 派生类时遇到链接器错误,并且已经应用了本文描述的变通方法,则应移除变通方法代码,因为 Visual C++ .NET 2003 中已经解决了该问题。
ATL Server
开发环境
用于 C++ 托管扩展的 Windows 窗体设计器
由于此版本添加了 Windows 窗体设计器,因此 Visual C++ 引入了在 C++ 托管扩展中创建 Windows 窗体应用程序的应用程序快速开发解决方案。
该功能包括对工具箱和服务器资源管理器的完全支持,使您可以向 Windows 窗体应用程序中直接拖放或剪贴控件和组件。另外,您可以通过属性网格轻易地操作控件和组件的属性。
项目生成自动化模型
Visual C++ .NET 提供了新属性页和大量的新对象,并为现有对象提供了用于增强项目生成模型的新属性和方法。
新属性页
“托管资源”属性页
“XML 数据生成器工具”属性页
“托管包装”属性页
“辅助托管包装”属性页
新对象
VCALinkTool 对象
VCActiveXReference 对象
VCAssemblyReference 对象
VCAuxiliaryManagedWrapperGeneratorTool 对象
VCManagedResourceCompilerTool 对象
VCManagedWrapperGeneratorTool 对象
VCPrimaryInteropTool 对象
VCProjectReference 对象
VCReference 对象
VCReferences 集合
VCReferenceConfiguration 对象
VCXMLDataGeneratorTool 对象
现有对象的新成员或已更改成员
几个新建的和更新的属性和方法添加到了现有对象中。注意,更改可以包含几个方面,如已更新的签名或新成员的添加。
对象 | 新成员或已更改成员 |
---|---|
VCCLCompilerTool 对象 | EnableEnhancedInstructionSet 属性 |
| ToolKind 属性 |
VCLinkerTool 对象 | FixedBaseAddress 属性 |
| ToolKind 属性 |
VCLibrarianTool 对象 | ToolKind 属性 |
VCCustomBuildTool 对象 | ToolKind 属性 |
VCMidlTool 对象 | ToolKind 属性 |
VCResourceCompilerTool 对象 | ToolKind 属性 |
VCPreBuildEventTool 对象 | ToolKind 属性 |
VCPreLinkEventTool 对象 | ToolKind 属性 |
VCPostBuildEventTool 对象 | ToolKind 属性 |
VCBscMakeTool 对象 | ToolKind 属性 |
VCNMakeTool 对象 | ToolKind 属性 |
VCWebServiceProxyGeneratorTool 对象 | Namespace 属性 (VCProjectEngine) |
| References 属性 |
| ToolKind 属性 |
VCWebDeploymentTool 对象 | ToolKind 属性 |
VCProject 对象 | AddAssemblyReference 方法 |
| AddActiveXReference 方法 |
| AddProjectReference 方法 |
| CanAddAssemblyReference 方法 |
| CanAddActiveXReference 方法 |
| CanAddProjectReference 方法 |
| Object 属性 |
| References 属性 |
| ReferencesConsumableByDesigners 属性 |
| RemoveReference 方法 |
| RootNamespace 属性 |
| VCReferences 属性 |
VCFile 对象 | AddFile 方法 |
| CanAddFile 方法 |
| FileType 属性 |
| Items 属性 |
| Object 属性 |
| RemoveFile 方法 |
VCFilter 对象 | Object 属性 |
VCConfiguration 对象 | FullReferencesPath 属性 |
| ReferencesPath 属性 |
| ReferenceTools 属性 |
| SatelliteDLLs 属性 |
| StopBuild 方法 |
| StyleSheets 属性 |
VCStyleSheet 对象 | FullReferencesPath 属性 |
| ReferencesPath 属性 |
| ReferenceTools 属性 |
| StyleSheetDirectory 属性 |
| StyleSheetName 属性 |
VCFileConfiguration 对象 | ProjectConfiguration 属性 |
| Compile 方法 |
| OutputUpToDate 属性 |
VCProjectEngine 对象 | ShowEnvironmentInBuildLog 属性 |