解决Visual C++ 2008 Feature Pack Release安装失败的方法 —— 在VS2008简体中文版上安装TR1

98 篇文章 0 订阅

在VS2008中使用#include <regex>,会得到以下错误提示:

fatal error C1083: Cannot open include file: 'regex': No such file or directory 
然后google关键字:“Cannot open include file: 'regex': No such file or directory”,可以找到下面这个link:
“Cannot open include file: 'regex'” 
可以得到相关解答 为:
[1] 
Yes, VC++ 2010 and 2008 SP1 include the TR1 regex library. If you have SP1 installed, but don't have that header, I recommend repairing your Visual Studio installation. 
If using a third-party library is an option, I recommend boost's xpressive or regex libraries, the latter of which was the basis for TR1's regex.
[2]
RTM stands for release to manufacturing, which is the originally released version (without service packs). If you installed the service pack you will have a higher version number in Help->About.
[3]
yea, I tried to install the sp1 and the version number increased, and "regex" is in there.
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en
 


然后查看一下本机上安装的VS2008,版本号如下:
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5 SP1
因此,在RTM版本上并没有service packs,所以才找不到'regex'。
通过上面的回答,可以找到“Microsoft Visual Studio 2008 Service Pack 1 (Installer)   (VS90sp1-KB945140-ENU.exe 536KB) ”,下载安装发现出错,提示这个更新只支持E版的VS2008:
Installation Requirements:
A compatible version of Visual Studio 2008 was not detected on the system. This update is designed for only the Microsoft Visual Studio 2008 (ENU) product family, and is not compatible with any Express editions. 


要删除中文版的再装英文版的比较繁琐,因此继续寻找其他的解决办法。 

遇到的问题,说明当前安装的VS2008没有包含regex,在MSDN ( http://msdn.microsoft.com/en-us/ms348103.aspx )上搜索关键字“regex” ,可以搜到一篇名为“<regex>”的文档。然后可以得到关键字“TR1 Regular Expressions”,然后可以进一步找到一下文档等等。
“Standard C++ Library TR1 Extensions Reference”
“TR1 Regular Expressions”
“Quick Start for C++ TR1 Regular Expressions - CodeProject  ”

在“Standard C++ Library TR1 Extensions Reference ”一文中,可以找到以下的提示:
If you start hitting linker errors with this code (even though the includes appear to be present), ensure you download the Visual C++ 2008 Feature Pack Release to get it.
This page should really link to it - http://www.microsoft.com/downloads/details.aspx?FamilyId=D466226B-8DAB-445F-A7B4-448B326C48E7&displaylang=en

 

通过上面的提示,可以找到“Visual C++ 2008 Feature Pack Release ”,根据介绍可知,这个Visual C++ 2008功能包 扩展了VS2008的功能,通过使用这个扩展,MFC程序可以具有更强大的功能。This feature pack also includes an implementation of TR1 . 这就是我们要找的。
在“Standard C++ Library TR1 Extensions Reference”一文中得知:
This reference describes the Visual C++ implementation of the proposed extensions of the C++ ISO standard that are included in the draft document, "Technical Report 1 ." The Visual C++ implementation includes support for fixed-size arrays, function objects, hash tables, regular expressions, template metaprogramming, template types for aggregating related objects, and random-number generation.

 

在“系统要求”一栏中,说明这个功能包仅支持英文系统版本的VS2008,但是下句又说明,对于非英语版本的也可以使用 :
Support for systems with non-English versions of Visual Studio 2008 installed will be available in Visual Studio 2008 Service Pack 1.

 

然后在MSDN上搜索关键字“Visual Studio 2008 Service Pack 1 ”,可以找到以下文档:
Microsoft Visual Studio 2008 Service Pack 1 (Installer)   (VS90sp1-KB945140-ENU.exe 536KB) ”—— 上文尝试过,这个只能使用于E版的VS2008
Microsoft Visual Studio 2008 Service Pack 1 (iso)   (VS2008SP1ENUX1512962.iso 831.3MB) ”—— 未尝试
可以发现,这两个“Visual Studio 2008 Service Pack 1”除了文件大小不同,其余介绍都一样,下载和安装比较费时,但欣慰的是安装成功了。再次查看VS的版本号,发现版本号比安装前的提高了。
Version 9.0.21022.8 RTM => 9.0.30729.1 sp
对于上面的测试代码不再提示未找到regex的错误提示。下来的工作是做进一步的测试和使用。


参考: 
[1] Standard C++ Library TR1 Extensions Reference   (标准C++库TR1的扩展参考)
http://msdn.microsoft.com/en-us/library/bb982198%28v=VS.90%29.aspx 
[2] TR1 Regular Expressions
http://msdn.microsoft.com/en-us/library/bb982727%28v=VS.90%29.aspx 
[3] Cannot open include file: 'regex'
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/fc2e32b5-e55f-416f-8c74-c018d0f793ab/ 
[4] MSDN Library for Visual Studio 2008 SP1 
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7bbe5eda-5062-4ebb-83c7-d3c5ff92a373&DisplayLang=en 
[5] Quick Start for C++ TR1 Regular Expressions
http://www.codeproject.com/KB/string/TR1Regex.aspx 
[6] Visual C++ 2008 Feature Pack安装失败
http://zhanyonhu.blog.163.com/blog/static/1618604420094142334417/ 
[7] vc2008中MFC重大变革-Visual C++ 2008 Feature Pack Beta 发布(附图) 
http://www.cppblog.com/woaidongmao/archive/2009/06/19/88092.aspx 
[8] Visual C++ 2008 Feature Pack 体验 
http://www.cnblogs.com/arowana/archive/2008/01/19/1045244.html 


附:“ Visual C++ 2008 Feature Pack Release”说明

 

安装
Visual C++ 2008 Feature Pack Release    (VC2008FeaturePack.exe 322.9MB)

Overview 
The Visual C++ 2008 Feature Pack extends the VC++ Libraries shipped with Visual Studio 2008 and is fully covered under Microsoft's standard support policies.
The VC++ 2008 MFC libraries have been extended to support creation of applications that have:
    * Office Ribbon style interface
    * Office 2007, Office 2003 and Office XP look and feel
    * Modern Visual Studio-style docking toolbars and panes
    * Fully customizable toolbars and menus
    * A rich set of advanced GUI controls
    * Advanced MDI tabs and groups
    * And much more!
This feature pack also includes an implementation of TR1 . Portions of TR1 are scheduled for adoption in the upcoming C++0x standard as the first major addition to the ISO 2003 standard C++ library.Our implementation includes a number of important features such as:
    * Smart pointers
    * Regular expression parsing
    * New containers (tuple, array, unordered set, etc)
    * Sophisticated random number generators
    * Polymorphic function wrappers
    * Type traits
    * And more!
Note: This feature pack does not include C99 compatibility or support for special math functions.

System Requirements 
    * Supported Operating Systems:Windows Server 2003;Windows Vista;Windows XP
    * Visual Studio: This Feature Pack is only supported on systems which have the English language (ENU) version of Visual Studio 2008 Standard Edition or above installed.
          o Support for systems with non-English versions of Visual Studio 2008 installed will be available in Visual Studio 2008 Service Pack 1 .
    * Microsoft Windows SDK: If you install the Visual C++ 2008 Feature Pack and then install the Windows SDK for Windows Server 2008 and .NET Framework 3.5, some of the files in the Feature Pack are overwritten and lose the additions made by the Feature Pack.
      Resolution:
          o Please install the Windows SDK for Windows Server 2008 and .NET Framework 3.5 first and then the Feature Pack.
          o If you have already installed the Feature Pack first and then Windows SDK, repairing your VS 2008 installation should solve the problem.

Instructions 
MSDN online Libraries
The MSDN online libraries have been updated with new documentation and walkthroughs that support the new MFC and TR1 features included in this release. The documentation provides some great content to get you up and running quickly with the new components. The documentation can be found at:
    * MFC http://msdn2.microsoft.com/en-us/library/bb982354.aspx 
    * TR1 http://msdn2.microsoft.com/en-us/library/bb982198.aspx 

Additional Information 
VC Redist Package
The VCRedist_x86.exe package has been updated with this refresh to resolve previous installation and deployment blocking issues.

 

 

 

在VS2008中使用#include <regex>,会得到以下错误提示:
fatal error C1083: Cannot open include file: 'regex': No such file or directory 
然后google关键字:“Cannot open include file: 'regex': No such file or directory”,可以找到下面这个link:
“Cannot open include file: 'regex'” 
可以得到相关解答 为:
[1] 
Yes, VC++ 2010 and 2008 SP1 include the TR1 regex library. If you have SP1 installed, but don't have that header, I recommend repairing your Visual Studio installation. 
If using a third-party library is an option, I recommend boost's xpressive or regex libraries, the latter of which was the basis for TR1's regex.
[2]
RTM stands for release to manufacturing, which is the originally released version (without service packs). If you installed the service pack you will have a higher version number in Help->About.
[3]
yea, I tried to install the sp1 and the version number increased, and "regex" is in there.
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en
 


然后查看一下本机上安装的VS2008,版本号如下:
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5 SP1
因此,在RTM版本上并没有service packs,所以才找不到'regex'。
通过上面的回答,可以找到“Microsoft Visual Studio 2008 Service Pack 1 (Installer)   (VS90sp1-KB945140-ENU.exe 536KB) ”,下载安装发现出错,提示这个更新只支持E版的VS2008:
Installation Requirements:
A compatible version of Visual Studio 2008 was not detected on the system. This update is designed for only the Microsoft Visual Studio 2008 (ENU) product family, and is not compatible with any Express editions. 


要删除中文版的再装英文版的比较繁琐,因此继续寻找其他的解决办法。 

遇到的问题,说明当前安装的VS2008没有包含regex,在MSDN ( http://msdn.microsoft.com/en-us/ms348103.aspx )上搜索关键字“regex” ,可以搜到一篇名为“<regex>”的文档。然后可以得到关键字“TR1 Regular Expressions”,然后可以进一步找到一下文档等等。
“Standard C++ Library TR1 Extensions Reference”
“TR1 Regular Expressions”
“Quick Start for C++ TR1 Regular Expressions - CodeProject  ”

在“Standard C++ Library TR1 Extensions Reference ”一文中,可以找到以下的提示:
If you start hitting linker errors with this code (even though the includes appear to be present), ensure you download the Visual C++ 2008 Feature Pack Release to get it.
This page should really link to it - http://www.microsoft.com/downloads/details.aspx?FamilyId=D466226B-8DAB-445F-A7B4-448B326C48E7&displaylang=en

 

通过上面的提示,可以找到“Visual C++ 2008 Feature Pack Release ”,根据介绍可知,这个Visual C++ 2008功能包 扩展了VS2008的功能,通过使用这个扩展,MFC程序可以具有更强大的功能。This feature pack also includes an implementation of TR1 . 这就是我们要找的。
在“Standard C++ Library TR1 Extensions Reference”一文中得知:
This reference describes the Visual C++ implementation of the proposed extensions of the C++ ISO standard that are included in the draft document, "Technical Report 1 ." The Visual C++ implementation includes support for fixed-size arrays, function objects, hash tables, regular expressions, template metaprogramming, template types for aggregating related objects, and random-number generation.

 

在“系统要求”一栏中,说明这个功能包仅支持英文系统版本的VS2008,但是下句又说明,对于非英语版本的也可以使用 :
Support for systems with non-English versions of Visual Studio 2008 installed will be available in Visual Studio 2008 Service Pack 1.

 

然后在MSDN上搜索关键字“Visual Studio 2008 Service Pack 1 ”,可以找到以下文档:
Microsoft Visual Studio 2008 Service Pack 1 (Installer)   (VS90sp1-KB945140-ENU.exe 536KB) ”—— 上文尝试过,这个只能使用于E版的VS2008
Microsoft Visual Studio 2008 Service Pack 1 (iso)   (VS2008SP1ENUX1512962.iso 831.3MB) ”—— 未尝试
可以发现,这两个“Visual Studio 2008 Service Pack 1”除了文件大小不同,其余介绍都一样,下载和安装比较费时,但欣慰的是安装成功了。再次查看VS的版本号,发现版本号比安装前的提高了。
Version 9.0.21022.8 RTM => 9.0.30729.1 sp
对于上面的测试代码不再提示未找到regex的错误提示。下来的工作是做进一步的测试和使用。


参考: 
[1] Standard C++ Library TR1 Extensions Reference   (标准C++库TR1的扩展参考)
http://msdn.microsoft.com/en-us/library/bb982198%28v=VS.90%29.aspx 
[2] TR1 Regular Expressions
http://msdn.microsoft.com/en-us/library/bb982727%28v=VS.90%29.aspx 
[3] Cannot open include file: 'regex'
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/fc2e32b5-e55f-416f-8c74-c018d0f793ab/ 
[4] MSDN Library for Visual Studio 2008 SP1 
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7bbe5eda-5062-4ebb-83c7-d3c5ff92a373&DisplayLang=en 
[5] Quick Start for C++ TR1 Regular Expressions
http://www.codeproject.com/KB/string/TR1Regex.aspx 
[6] Visual C++ 2008 Feature Pack安装失败
http://zhanyonhu.blog.163.com/blog/static/1618604420094142334417/ 
[7] vc2008中MFC重大变革-Visual C++ 2008 Feature Pack Beta 发布(附图) 
http://www.cppblog.com/woaidongmao/archive/2009/06/19/88092.aspx 
[8] Visual C++ 2008 Feature Pack 体验 
http://www.cnblogs.com/arowana/archive/2008/01/19/1045244.html 


附:“ Visual C++ 2008 Feature Pack Release”说明

 

安装
Visual C++ 2008 Feature Pack Release    (VC2008FeaturePack.exe 322.9MB)

Overview 
The Visual C++ 2008 Feature Pack extends the VC++ Libraries shipped with Visual Studio 2008 and is fully covered under Microsoft's standard support policies.
The VC++ 2008 MFC libraries have been extended to support creation of applications that have:
    * Office Ribbon style interface
    * Office 2007, Office 2003 and Office XP look and feel
    * Modern Visual Studio-style docking toolbars and panes
    * Fully customizable toolbars and menus
    * A rich set of advanced GUI controls
    * Advanced MDI tabs and groups
    * And much more!
This feature pack also includes an implementation of TR1 . Portions of TR1 are scheduled for adoption in the upcoming C++0x standard as the first major addition to the ISO 2003 standard C++ library.Our implementation includes a number of important features such as:
    * Smart pointers
    * Regular expression parsing
    * New containers (tuple, array, unordered set, etc)
    * Sophisticated random number generators
    * Polymorphic function wrappers
    * Type traits
    * And more!
Note: This feature pack does not include C99 compatibility or support for special math functions.

System Requirements 
    * Supported Operating Systems:Windows Server 2003;Windows Vista;Windows XP
    * Visual Studio: This Feature Pack is only supported on systems which have the English language (ENU) version of Visual Studio 2008 Standard Edition or above installed.
          o Support for systems with non-English versions of Visual Studio 2008 installed will be available in Visual Studio 2008 Service Pack 1 .
    * Microsoft Windows SDK: If you install the Visual C++ 2008 Feature Pack and then install the Windows SDK for Windows Server 2008 and .NET Framework 3.5, some of the files in the Feature Pack are overwritten and lose the additions made by the Feature Pack.
      Resolution:
          o Please install the Windows SDK for Windows Server 2008 and .NET Framework 3.5 first and then the Feature Pack.
          o If you have already installed the Feature Pack first and then Windows SDK, repairing your VS 2008 installation should solve the problem.

Instructions 
MSDN online Libraries
The MSDN online libraries have been updated with new documentation and walkthroughs that support the new MFC and TR1 features included in this release. The documentation provides some great content to get you up and running quickly with the new components. The documentation can be found at:
    * MFC http://msdn2.microsoft.com/en-us/library/bb982354.aspx 
    * TR1 http://msdn2.microsoft.com/en-us/library/bb982198.aspx 

Additional Information 
VC Redist Package
The VCRedist_x86.exe package has been updated with this refresh to resolve previous installation and deployment blocking issues.

 

 转自:http://blog.csdn.net/delphiwcdj/article/details/6193161

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
有人说c++程序员可以分成两类,读过effective c++的和没读过的。世界顶级c++大师scott meyers成名之作的第三版的确当得起这样的评价。当您读过这本书之后,就获得了迅速提升自己c++功力的一个契机。.(2-1)   在国际上,本书所引起的反响,波及整个计算技术出版领域,余音至今未绝。几乎在所有c++书籍的推荐名单上,本书都会位于前三名。作者高超的技术把握力、独特的视角。诙谐轻松的写作风格、独具匠心的内容组织,都受到极大的推崇和仿效。这种奇特的现象,只能解释为人们对这本书衷心的赞美和推祟。《effective c++》前两个版本的确抓住了全世界无数程序员的目光。原因十分显明:scott meyers 极富实践意义的c++ 研讨方式,描述出专家用以产出干净、正确、高效代码的经验法则和行事法则——也就是他们几乎总是做或不做的某些事。   这本书不是读完一遍就可以束之高阁的快餐读物,也不是用以解决手边问题的参考手册,而是需要您去反复阅读体会的,c++是真正程序员的语言,背后有着精深的思想与无与伦比的表达能力,这使得它具有类似宗教般的魅力。希望这本书自瞄帮助您跨越c抖的重重险阻,领略高处才有的壮美风光,做—个成功而快乐的c++程序员。...      本书一共组织 55 个准则,每一条准则描述一个编写出更好的 c++ 的方式。每一个条款的背后都有具体范例支撑。第三版有一半以上的篇幅是崭新内容,包括讨论资源管理和模板(templates)运用的两个新章。为反映出现代设计考虑,对第二版论题做了广泛的修订,包括异常(exceptions)、设计模式(design patterns)和多线程(multithreading)。      《effective c++》的重要特征包括:    * 高效的 classes、functions、templates 和inheritance hierarchies(继承体系)方面的专家级指导。    * 崭新的 "tr1" 标准程序库功能应用,以及与既有标准程序库组件的比较。    * 洞察 c++和其他语言(例如java、c#、c)之间的不同。此举有助于那些来自其他语言阵营的开发人员消化吸收 c++ 式的各种解法。(2-1)

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值