-
December 10th, 2003, 07:12 PM
#1
How to shift VC6.0 projects to VC7.1???
I have a simple project that works fine for VC 6.0, but when I updated my compiler to VC++ 7.1, and included the "mfc42d.lib"
there are tons of link errors which I cannot figure out,
But if I did not inlude mfc42d.lib, then link error " cannot open mfc42d.lib"!
Any help will be greatly appreciated!!!
James
Linking...
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: _strncpy already defined in libcmtd.lib(strncpy.obj)
msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in libcmtd.lib(typinfo.obj)
msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info:perator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in libcmtd.lib(typinfo.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: __setmbcp already defined in libcmtd.lib(mbctype.obj)
atlsd.lib(atltypes.obj) : error LNK2005: "public: __thiscall CSize::CSize(void)" (??0CSize@@QAE@XZ) already defined in mfc42d.lib(MFC42D.DLL)
...... Tons of link errors!!!
-
December 10th, 2003, 08:00 PM
#2
Try commenting out the mfc42d.lib includes.
What did you add it in the first place? An MFC project is linked to MFC libraries by default.
Kuphryn
-
December 11th, 2003, 09:51 AM
#3
First of all, the project works fine, compiling and linking, not problems at all for VC6.0.
when I migrate my project from 6.0 to 7.1, I did not change anything, 7.1 did this automatically, but after it compiled and linked, it say" cannot open mfc42d.lib or mfc42.lib"
for debug or release respectively.
If I include that again, it poped up tons of link errors!
James
-
December 11th, 2003, 10:40 AM
#4
-
August 15th, 2005, 10:16 AM
#5
Re: How to shift VC6.0 projects to VC7.1???
I have the same problem, does anyone know the solution?
There is not an explicit include statement that I can remove.
It tries to link automatically.
-
August 15th, 2005, 11:35 AM
#6
Re: How to shift VC6.0 projects to VC7.1???
Originally Posted by clodagho
I have the same problem, does anyone know the solution?
There is not an explicit include statement that I can remove.
It tries to link automatically.
The problem is that a MFC application written in Visual Studio 6 includes MFC4.2 and on .NET you include MFC7. So they are interfering because both export the same symbols. It is recommended to remove any reference (library files, mfc4.2 specific headers) and use MFC7 instead.
Best Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|