Saran wrote:
[color=blue]
>Hi All,
>
>I'm getting the following linker error when I try to build a library.
>
>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
>nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
>nafxcw.lib(filelist.obj) : error LNK2019: unresolved external symbol __mbctype referenced in function "void __stdcall _AfxAbbreviateName(char *,int,int)" (?_AfxAbbreviateName@@YGXPADHH@Z)
>
>1) Use MFC in a shared DLL
>2) Multi-Threaded DLL
>
>I'm using VC++ .NET 2003. It is compiling without any error in VC++ 6 (We are in the process of proting to .NET)
>
>Can any one help me in resolving the errors?[/color]
If you look inside <afx.h>, you'll find:
#ifndef _AFXDLL
#ifndef _UNICODE
#ifdef _DEBUG
#pragma comment(lib, "nafxcwd.lib")
....
So it appears that for some reason, _AFXDLL is not #defined, so the static
MFC library is selected. You should look at the preprocessor settings for
your project and make sure this symbol is listed there.
--
Doug Harrison
Microsoft MVP - Visual C++