yes i am sure i am using shared mfc libraries. Can you please make me clear about the solution you mentioned in including mfcXXd.lib.
Thanks
Main Topics
Browse All TopicsHi All,
Can anyone tell me how to resolve the following linking error:
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(viewedit.obj) : error LNK2019: unresolved external symbol __mbctype referenced in function "protected: long __thiscall CEditView::OnFindReplaceCm
.\Debug/XAgentISAPIExtensi
Configuration Properties are set as follows:
1) Use MFC in a shared Dll
2)Runtime library = Multi-threaded Debug DLL (/MDd)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I dont have anything in the additional dependencies tab.
By using verbose:lib option i get to know all the libraries that application will use.
One of them is
Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\lib\nafxcw
When i have already used shared mfc debug library then how come is the vc++ compiler adding this static one.
Please tell me what to ignore and what to include in the library.
Sorry to bother you again.
I cant do that because i get umpteen linking errors:
LNK2001: unresolved external symbol __afxForceEXCLUDE
LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)
error LNK2019: unresolved external symbol "void __stdcall AfxThrowMemoryException(vo
I have a dll with following settings:
Use of MFC: Use standard windows library
When i compile and link the application, everything runs successfully.
Now i change the settings as follows:
Use of MFC: Use MFC in a shared Dll
I get the following linking error:
IsapiRequest.obj : error LNK2019: unresolved external symbol __imp__RevertToSelf@0 referenced in function "public: int __thiscall ISAPI_REQUEST::Unimpersona
IsapiRequest.obj : error LNK2019: unresolved external symbol __imp__SetThreadToken@8 referenced in function "public: int __thiscall ISAPI_REQUEST::Impersonate
I then go to the code and comment these functions and run them again with the later settings.
To my surprise the code compiles successfully even with the later settings. Now this function is not using any thing new( MFC based) that other functions in the code using .
????????
Suppose there is a function whose calling convention is __cdecl
.
This function returns with another function whose calling convention is __stdcall.
This leads to a linking error.
How do i make the first function's convention changed to the __stdcall.
Ex:
int fun() // calling convention __cdecl
{
return abc() // calling convention __stdcall ( windows function defined in winbase.h
}
Business Accounts
Answer for Membership
by: nonubikPosted on 2004-06-09 at 03:42:05ID: 11268240
nafxcwd.lib is MFC Static-Link Library, Debug version.
Are you sure that you're usein MFC in a shared DLL? Have you changed your project setting from static MFC to shared?
If so, in the linker settings for your project, if you have nafxcwd.lib, change it to mfcXXd.lib