HELP: Problems with MFCxx.DLL
You really should link staticly. It eliminates the problems that you are
experiencing with the DLL, and does not make your code significantly bigger,
since the linker is able to throw out the unused code in the MFC and CRT
libraries. Installing the MFC DLLs is becoming harder all the time, what
with the many versions of them that are floating around, and MS's insistence
that this is now a "core component" and therefore subject to protection
under new versions of Windows.
> Your install program is responsible for installing the necessary DLLs on
> PC. MFC40.DLL exists on a PC because some time ago an install program such
> as Word97 setup placed it there. Therefore it may or may not be on a PC.
> MFC42.DLL is Version 4.2 of MFC whereas MFC40.DLL is version 4.0 so you
> would have to figure out what the differences are between these two
> of MFC.
> Basically you are approaching the problem from the wrong angle:
> - You shouldn't be trying to link to old DLLs which may or may not be on
> target PCs.
> - You should be distributing the DLLs your program was compiled and linked
> A program such as InstallShield distributed on your Visual C++ CD ROM will
> enable you to do this and you can replace existing DLLs possessing the
> file name with those that are newer by date and newer bvy version -
> preventing the so called DLL Hell.
> Unfortunately the installation is often a rush-job and is overlooked ...
> a professional and robust installation will hopefully be the first things
> your end-user sees.
> > Hi all,
> > I compile and link my code using VC++ 6.0 and link it to 'MFC42.DLL'
> > dynamically. Of course it doesn't work on machines which don't have
> > 'MFC42.DLL'. Can any one help me to answer following questions?
> > 1) What are the differences between 'MFC42.DLL' and 'MFC40.DLL'?
> > 2) Is 'MFC40.DLL' always installed on Windows 95/98/2000/NT by default?
> > 2.1) If yes, how can I link my code to 'MFC40.DLL' dynamically using
> > VC++ 6.0?
> > 2.2) If yes, is it possible to or how to create 'MFC40.lib' from
> > 'MFC40.DLL'?
> > 3) How to load some classes (objects or instances, for e.g.: 'CDialog',
> > 'COleControl', etc) from MFCxx.DLL dynamically? (Assumed that one
> > wouldn't use MFC but Win32 programming).
> > 4) Does MFC40.dll support ActiveX Control?
> > Any help would be very appreciated.
> > Best regards,
> > Jonathan