当然是STATIC的好,省事,方便

解决方案 »

  1.   

    用static编译后的bin文件太大,现在大多数的机器上都有mfc42?.dll文件的。
      

  2.   

    用了MFC,程序必然会“发福”。VCL更恐怖。要“减肥”,直接用API(如果你有兴趣用ASM写的话,20K就可以做出一个功能很完整的小程序)。
    至于static与share的问题,其实很简单:你看看有几个软件商出售的软件要求你必须有mfc42.dll——虽然它们是用MFC做的?既然用户不能保证有,那我的软件必须自己带一个,于是得不偿失:为了“减小”几百K,现在却要加上一个数M的DLL。更何况,这样做出来的程序似乎总给人感觉“不健全”、“不独立”。更何况,你的mfc42会不会与用户机器上装的mfc冲突?
      

  3.   

    Why should you use the shared version of MFC? 1。Using the shared library can result in smaller applications [a minimal application that uses most of the MFC library is less than 10K].2。The shared version of MFC supports MFC Extension DLLs and regular DLLs.3。Building an application that uses the shared MFC libraries is faster than building a statically linked MFC application because it is not necessary to link MFC itself. This is especially true in DEBUG builds where the linker must compact the debug information -- by linking with a DLL that already contains the debug information, there is less debug information to compact within your application. Why should you not use the shared version of MFC: 1。Shipping an application that uses the shared library requires that you ship the MFCxx.DLL (and others) library with your program. MFCxx.DLL is freely redistributable like many DLLs, but you still must install the DLL in your SETUP program. In addition, you must ship the MSVCRTxx.DLL, which contains the C-runtime library which is used both by your program and the MFC DLLs themselves.