将VC 6迁移到VC 8 [英] Migrating VC 6 to VC 8

查看:101
本文介绍了将VC 6迁移到VC 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我需要执行以下操作:

1.将整个解决方案(包含数十个项目)从VC 6.0迁移到VC

8.0。该项目有很多像CArray这样的MFC模板,并且弹出很多错误

,如:错误1错误C2248:''CObject :: operator ='':

无法访问类''CObject'中声明的私有成员d:\ program

files \ microsoft visual studio 8 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ br />
2.还有一些我希望转换为托管代码的库,以便将这些基础设施用于我们新的.net开发。

从哪里开始的任何想法?


- Dani

Hi there,
I need to do the following:
1. Migrate a whole solution (with tens of projects) from VC 6.0 to VC
8.0. The project has a lot of MFC templates like CArray, and many error
are poping out, like: Error 1 error C2248: ''CObject::operator ='' :
cannot access private member declared in class ''CObject'' d:\program
files\microsoft visual studio 8\vc\atlmfc\include\afxtempl.h 272.
2. Also few libraries I would like to convert to managed code, in order
to use these infrastucture to our new .net development.
Any ideas from where to start ?

-- Dani

推荐答案

也许,这个可能有用:

http://beta.blogs.msdn.com/nikolad/a...15/429652.aspx


-

问候,

Nish [VC ++ MVP]

" danip" <哒*** @ ecmed.com>在消息中写道

news:11 ********************** @ g47g2000cwa.googlegr oups.com ...
Perhaps, this might useful :

http://beta.blogs.msdn.com/nikolad/a...15/429652.aspx

--
Regards,
Nish [VC++ MVP]
"danip" <da***@ecmed.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
您好,
我需要执行以下操作:
1.将整个解决方案(包含数十个项目)从VC 6.0迁移到VC
8.0。该项目有很多像CArray这样的MFC模板,并且弹出很多错误,如:错误1错误C2248:''CObject :: operator ='':
无法访问类中声明的私有成员''CObject''d:\ program
files \ microsoft visual studio 8 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\转换为托管代码,以便将这些基础设施用于我们新的.net开发。
任何想法从哪里开始?

- Dani
Hi there,
I need to do the following:
1. Migrate a whole solution (with tens of projects) from VC 6.0 to VC
8.0. The project has a lot of MFC templates like CArray, and many error
are poping out, like: Error 1 error C2248: ''CObject::operator ='' :
cannot access private member declared in class ''CObject'' d:\program
files\microsoft visual studio 8\vc\atlmfc\include\afxtempl.h 272.
2. Also few libraries I would like to convert to managed code, in order
to use these infrastucture to our new .net development.
Any ideas from where to start ?

-- Dani



danip写道:
danip wrote:
你好,
我需要做以下事情:
1.迁移一个整个解决方案(有几十个项目)从VC 6.0到VC
8.0。该项目有很多像CArray这样的MFC模板,并且弹出很多错误,如:错误1错误C2248:''CObject :: operator ='':
无法访问类中声明的私有成员''CObject''d:\ program
files \ microsoft visual studio 8 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\转换为托管代码,以便将这些基础设施用于我们新的.net开发。
任何想法从哪里开始?

- Dani
Hi there,
I need to do the following:
1. Migrate a whole solution (with tens of projects) from VC 6.0 to VC
8.0. The project has a lot of MFC templates like CArray, and many error
are poping out, like: Error 1 error C2248: ''CObject::operator ='' :
cannot access private member declared in class ''CObject'' d:\program
files\microsoft visual studio 8\vc\atlmfc\include\afxtempl.h 272.
2. Also few libraries I would like to convert to managed code, in order
to use these infrastucture to our new .net development.
Any ideas from where to start ?

-- Dani




Dani:


我个人不喜欢这些MFC收集课程,如果你是

想移植到.NET您可以考虑用

STL集合类替换它们。这样,将b $ b转换为STL.NET应该相对容易(如果它已经发布!)。


你在这些CArray中放什么'' S?我认为数组中的对象

必须有一个复制构造函数和赋值运算符,并且如果该类是从CObject派生的那么
那么你需要编写这些

方法你自己,因为默认的方法不起作用,因为CObject的

是私有的。当然,这也会发生在STL上。


David Wilkinson



Dani:

I personally do not like these MFC collection classes, and if you are
thinking of migrating to .NET you might consider replacing them by the
STL collection classes. That way, it should be relatively easy to
convert to STL.NET (if it is ever released!).

What are you putting in these CArray''s? I would think that the objects
in the array must have a copy constructor and assignment operator, and
if the class is derived from CObject then you will need to write these
methods yourself, because the default ones won''t work because CObject''s
ones are private. Of course, this will happen with STL also.

David Wilkinson


大卫


只是好奇。关于CArray,你不喜欢什么?它只是一个模板化的

级别,它似乎对我有用。是什么让STL系列

课更理想(假设一个人当然已经在使用MFC)?


Tom

Hi David,

Just curious. What do you not like about CArray. It''s just a templated
class and it seems to work well for me. What makes the STL collection
classes more desirable (assuming one is already using MFC of course)?

Tom

Dani:

我个人不喜欢这些MFC集合类,如果您正在考虑迁移到.NET,可以考虑用STL替换它们。 />集合类。这样,转换为STL.NET应该相对容易(如果它已经发布了!)。

你在这些CArray中放了什么?我认为数组中的对象必须有一个复制构造函数和赋值运算符,如果
类是从CObject派生的,那么你需要自己编写这些方法,因为默认的人不会工作,因为CObject的那些是私人的。当然,这也会发生在STL上。

David Wilkinson
Dani:

I personally do not like these MFC collection classes, and if you are
thinking of migrating to .NET you might consider replacing them by the STL
collection classes. That way, it should be relatively easy to convert to
STL.NET (if it is ever released!).

What are you putting in these CArray''s? I would think that the objects in
the array must have a copy constructor and assignment operator, and if the
class is derived from CObject then you will need to write these methods
yourself, because the default ones won''t work because CObject''s ones are
private. Of course, this will happen with STL also.

David Wilkinson



这篇关于将VC 6迁移到VC 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆