我用Atl写了一个Composite control,在Debug下编译通过,运行良好。可是在Release下出现“怪事”:
Linking...
   Creating library ReleaseMinSize/ProjectGrid.lib and object ReleaseMinSize/ProjectGrid.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinSize/ProjectGrid.dll : fatal error LNK1120: 1 unresolved externals
请大家帮帮忙,谢谢~~

解决方案 »

  1.   

    这个问题我也常碰到,原因不详
    不过意思是说你的_MAIN内部符号没有解析,仔细检查下看使用的的各处有写错的没。
      

  2.   

    谢谢,你指的_MAIN在哪个地方呢?呵呵,我刚刚接触到这个东西,望多指教
      

  3.   

    Remove "ATL_MIN_CRT" from your preprocessor directives
      

  4.   

    MSDN :
    HOWTO: Visual C++ 5.0 (Professional & Enterprise) Support FAQQ167654Q. What causes linker error LNK2001 during Release MinDependency builds of
    ATL projects?A. This can happen when the C Run-Time (CRT) startup code is required for
    some CRT functions. You can either remove all references to the CRT
    functions or remove the _ATL_MIN_CRT preprocessor definition from your
    compiler settings.