就是我最近在学MFC,我自己照书上编的MFC程序直接运行时能运行,但再次打开时,编译正确,但运行时就会提示有错误,我把生成的那些文件都添加进去了啊,错误如下:
--------------------Configuration: EditBox - Win32 Debug--------------------
Linking...
LINK : warning LNK4098: defaultlib "mfc42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfcs42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfco42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/EditBox.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.EditBox.exe - 1 error(s), 0 warning(s)不知道是什么原因,请高手教教我,谢谢!

解决方案 »

  1.   

    第一个是Project   Settings/Link,Category:General中Link   incrementally打勾就行了,其它的你可能用了静态连接方式吧,而且选择了Ignore   all   default   libraries选项,具体要试试看改变设置才知道,改成共享连接看行不行
      

  2.   

    希望对你有帮助
    http://blog.csdn.net/jinhill/archive/2008/12/22/3580528.aspx
      

  3.   

    1.Project->Setting->C/C++,
      Category->Procomplied Hearders   
      选择No   Using   Procomplied   Hearders
    你还可以
    2.在*.cpp中的开头加入#include "stdafx.h",加在最开始的地方。
      

  4.   

     谢谢大家,已经解决了,由于我是初学VC,所以我以为打开还是像打开控制台程序一样,原来打开VC程序要打开.dsw那个,不过还是谢谢