mfc >> Unresolved external with custom build of MFC71.DLL

by VEZpc2NoZXI » Thu, 20 Jan 2005 18:47:03 GMT

Hi,

I have build a custom version of the MFC71 and the MSVCRT dll and now I am
trying to link this with my C++ projects. But I got a lot of unresolved
externals like

error LNK2001: Nichtaufgelstes externes Symbol "public: virtual long
__thiscall CWnd::put_accValue(struct tagVARIANT,unsigned short *)"
(?put_accValue@CWnd@@UAEJUtagVARIANT@@PAG@Z)

I think the problem is that this an some other functions are missing in
src/mfc/intel/mfc71.def

What can I do? Is there a download page where I can get a corret file.



mfc >> Unresolved external with custom build of MFC71.DLL

by Joseph M. Newcomer » Fri, 21 Jan 2005 07:05:43 GMT


Sounds like you enjoy living dangerously. As far as I know, building your own MFCxxx.DLL
is not supported.
joe




Joseph M. Newcomer [MVP]
email: XXXX@XXXXX.COM
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm



mfc >> Unresolved external with custom build of MFC71.DLL

by VEZpc2NoZXI » Fri, 21 Jan 2005 16:37:05 GMT

Sounds like you have no experiences with the MFC. I have done this over 10
years starting with version 4.x of the MFC.

This ist supported by MS. See TN033 or the readme.txt in the MFC source
distribution or the makefile in the crt source distribution ....

Thomas






RE: Unresolved external with custom build of MFC71.DLL

by VEZpc2NoZXI » Fri, 21 Jan 2005 17:53:04 GMT

Here are some more details for the problem. I take the function
CWnd::put_accValue. This function is declared in AfxWin.h as public function
of the class CWnd.

virtual HRESULT put_accValue(VARIANT varChild, BSTR szValue);

In the original library to the MFC71.DLL there are 2 symbols defined for
this functions:

001 00000000 UNDEF notype External |
?put_accValue@CWnd@@UAEJUtagVARIANT@@PA_W@Z (public: virtual long __thiscall
CWnd::put_accValue(struct tagVARIANT,wchar_t *))
002 00000000 UNDEF notype WeakExternal |
?put_accValue@CWnd@@UAEJUtagVARIANT@@PAG@Z (public: virtual long __thiscall
CWnd::put_accValue(struct tagVARIANT,unsigned short *))

but DLL exported this function only with
5235 ?put_accValue@CWnd@@UAEJUtagVARIANT@@PA_W@Z (public:
virtual long __thiscall CWnd::put_accValue(struct tagVARIANT,wchar_t *))

Building my own MFC library did not produce the weak external. I thing this
is the problem, but I don't know how to solve it





Unresolved external with custom build of MFC71.DLL

by Joseph M. Newcomer » Sat, 22 Jan 2005 15:49:38 GMT

It also means that you have incompatible versions of MFCxx DLLs. I find the concept scary
in the extreme.
joe






Joseph M. Newcomer [MVP]
email: XXXX@XXXXX.COM
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm


Similar Threads

1. Using custom built MFC library instead of MFC71.dll

Hi, I have rebuilt the MFC library due to a corrected bug in oledisp1.cpp.
(See previous post) I named the libraries CCMFC71.DLL instead of the
standard MFC71.dll. (ccmfc71u.dll etc) (I obviously don't want to replace
the standard MFC71.DLL)
Now how do I get my MFC (7.1) projects to use this library instead of
MFC71.dll I can find no references of MFC71.lib in the project.

thanks and regards
Anders Sandberg


2. unresolved external symbol/using an external dll