|
-
March 13th, 2001, 03:31 PM
#1
LINK2005
Hi,
i have this link error only when i compile my project in release mode. The debug mode is ok.
My project (.exe) must link many lib together, all lib compile correctly in release mode.
The code generation is the same for all, MultiThreadDll.
The error :
nafxcw.lib(strcore.obj) : error LNK2005: "public: __thiscall CString::CString(class CString const &)" (??0CString@@QAE@ABV0@@Z) already defined in mfc42.lib(MFC42.DLL)
great thanks in advance
Carl
-
December 12th, 2002, 10:13 AM
#2
Carl,
I've run into this before. The thing is that different DLLs are used by the release and debug versions.
What you have to do is to ignore the nafxcw.lib library in your release build.
I Visual Studio.NET (VC 7) make sure on the right side you have solution explorer selected. Right click on the appropriate project, choose properties, choose linker, choose input and in ignore specific library type in this library name. (nafxcw.lib) You may have to repeat this step as more may show up.
In VC6 choose menu option project / setting. Go to link tab. Choose category Input. In the Ignore Libraries edit box put nafxcw.lib. Once again realize that you may have to add more than one.
Gary
-
December 12th, 2002, 12:13 PM
#3
See if you have projects that use libraries linked statically with MFC and libraries that use MFC as dynamic (shared) libraries you most likely will have this problem. I do not think that ignoring some will fix your problem.
If you can re-link all libraries to use the same type of linkage.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
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
|