---
title: "VC8 VS VC6"
author: "eteran"
date: "2007-05-20T14:22:00Z"
tags: []
slug: "vc8-vs-vc6"
draft: false
lastmod: "2007-05-20T14:22:00Z"
id: 771922
url: "https://eteran.iteye.com/blog/771922"
---

# VC8 VS VC6

Why need we migrate from vc6 to vc8? (for developer, for final user, for IT corporation)

 

**Key words: visual c++ 6.0, visual c++ 8.0, visual studio 2005**

## What’s new in Visual C++ 8.0?

#### Libraries Changes

As of Visual C++ 2005, the Standard C++ Library and the ATL, MFC, and CRT libraries are [side-by-side shared assemblies](http://msdn2.microsoft.com/en-us/library/aa371852%28VS.80%29.aspx) with [manifests](http://msdn2.microsoft.com/en-us/library/aa375365%28VS.80%29.aspx). Similarly, the compiler and linker settings now default to manifest generation using [mt.exe](http://msdn2.microsoft.com/en-us/library/aa375649%28VS.80%29.aspx). This will ensure that all Visual C++ executables have a manifest that refers to their dependence on ATL, MFC, and CRT.

Visual C++ 2005 supports the use of the Standard C++ Library and the ATL, MFC, and CRT libraries as mixed assemblies compiled with /clr. These mixed libraries allow you to use all of their existing functions when your code contains a mixture of native code and MSIL-based [\_\_clrcall](http://msdn2.microsoft.com/en-us/library/ec7sfckb%28VS.80%29.aspx) code.

Initialization of Mixed Assemblies

The library support changes in Visual C++ 2005 resolve the "loader lock" issues that applied to mixed DLLs in Visual C++ .NET and Visual C++ .NET 2003. However, there is still a restriction that your [DllMain](http://msdn2.microsoft.com/en-us/library/ms682583%28VS.80%29.aspx) code must never access the CLR.

#### More Support standard C++

For example:

Vc6 pass:

*for (int i = 0; i &lt; 256; i++)*  
*{*  
*}*

Vc8 error: do not define parameter i.  
*for (i = 0; i &lt; 256; i++)*

*{*  
*}*

#### More power IDE

Visual studio 2005 is a more powerful, relax develop tool.

**Debug tool**

The one of the more important improve is the debug window. It will show the detail data of a container, for example debug vector or list. We do not need get the items value by *vector.\_Myfirst\[0], vector.\_Myfirst\[1]*, or get the container’s size by *vector.size()*. For developer, it is great.

&lt;!--\[if gte vml 1]&gt;&lt;v:shapetype id="\_x0000\_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt; &lt;v:stroke joinstyle="miter"/&gt; &lt;v:formulas&gt; &lt;v:f eqn="if lineDrawn pixelLineWidth 0"/&gt; &lt;v:f eqn="sum @0 1 0"/&gt; &lt;v:f eqn="sum 0 0 @1"/&gt; &lt;v:f eqn="prod @2 1 2"/&gt; &lt;v:f eqn="prod @3 21600 pixelWidth"/&gt; &lt;v:f eqn="prod @3 21600 pixelHeight"/&gt; &lt;v:f eqn="sum @0 0 1"/&gt; &lt;v:f eqn="prod @6 1 2"/&gt; &lt;v:f eqn="prod @7 21600 pixelWidth"/&gt; &lt;v:f eqn="sum @8 21600 0"/&gt; &lt;v:f eqn="prod @7 21600 pixelHeight"/&gt; &lt;v:f eqn="sum @10 21600 0"/&gt; &lt;/v:formulas&gt; &lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/&gt; &lt;o:lock v:ext="edit" aspectratio="t"/&gt; &lt;/v:shapetype&gt;&lt;v:shape id="\_x0000\_i1025" type="#\_x0000\_t75" style="'width:383.25pt; height:2in'"&gt; &lt;v:imagedata src="file:///C:\\WINDOWS\\TEMP\\msohtml1\\01\\clip\_image001.png" o:title=""/&gt; &lt;/v:shape&gt;&lt;!\[endif]--&gt;&lt;!--\[if !vml]--&gt;  
&lt;!--\[endif]--&gt;

**Code pucker**

#pragma region lets you specify a block of code that you can expand or collapse when using the [outlining feature](http://msdn2.microsoft.com/en-us/library/td6a5x4s%28VS.80%29.aspx) of the Visual Studio Code Editor. For example:

[*#pragma region Region\_1*]()

*void Test() {}*

*void Test2() {}*

*void Test3() {}*

*#pragma endregion Region\_1*

## Advantage & Disadvantage

&lt;!--\[if !supportLists]--&gt;1.         &lt;!--\[endif]--&gt;更强大IDE开发环境可以有效的提高程序员的开发效率和减少团队培训的工作量。

&lt;!--\[if !supportLists]--&gt;2.         &lt;!--\[endif]--&gt;Manifest 为DLL heap提供了一个解决方案，有效的减少了bug的产生。当然由于硬盘的扩大和网络环境的改善，由此带来的分发部署文件的增大可以容忍。

&lt;!--\[if !supportLists]--&gt;3.         &lt;!--\[endif]--&gt;vc8支持CLR的混合编译，这在某种程度上有利于我们从vc8迁移到.net 3.0平台。

&lt;!--\[if !supportLists]--&gt;4.         &lt;!--\[endif]--&gt;Vc8 支持新的类库，这样我们不用为了利用某个DLL里的函数而写一大堆加载和查找函数地址的代码，减少了产生bug的机会。

&lt;!--\[if !supportLists]--&gt;5.         &lt;!--\[endif]--&gt;更好的支持C++标准，for example: *std::copy, getenv* 等函数使用时会被提示为: warning C4996: 'getenv' was declared deprecated.

## [Resources, links and acknowledgements]()

[What's New in Visual C++](http://msdn2.microsoft.com/en-us/library/f0tby9k9%28VS.80%29.aspx) 

[Bootstrapper for the VC++ 2005 Redists](http://www.codeproject.com/cpp/vcredists_x86.asp)