DEBUG时没问题,RELEASE时:
1、
当project options为:
/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Fp"Release/DY_SMGP.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c 
时,编译时出现:
--------------------Configuration: DY_SMGP - Win32 Release--------------------
Compiling...
StdAfx.cpp
d:\vc_apps\dy_smgp\release\msado15.tlh(407) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
Compiling...
DY_SMGP.cpp
DY_SMGPDlg.cpp
D:\VC_APPS\DY_SMGP\DayooPP.h(41) : warning C4091: 'typedef ' : ignored on left of 'struct DAYOODD_SUBMIT_RESP' when no variable is declared
Generating Code...
Linking...
libcmt.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrt.lib(MSVCRT.dll)
libcmt.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrt.lib(MSVCRT.dll)
libcmt.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in msvcrt.lib(MSVCRT.dll)
libcmt.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrt.lib(cinitexe.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __setmbcp already defined in libcmt.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
msvcrt.lib(cinitexe.obj) : warning LNK4098: defaultlib "libcmt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
libcmt.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Release/DY_SMGP.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.DY_SMGP.exe - 10 error(s), 4 warning(s)
2、
当project options为:
/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Fp"Release/DY_SMGP.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c 
时,编译时出现:--------------------Configuration: DY_SMGP - Win32 Release--------------------
Compiling...
StdAfx.cpp
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxver_.h(130) : fatal error C1189: #error :  Please use the /MD switch for _AFXDLL builds
Error executing cl.exe.DY_SMGP.exe - 1 error(s), 0 warning(s)各路高手,如何解决?