ATL & ANSI字符串函数
ATL创建组件工程中,我用了strupr函数,在Debug版中一切正常,但在Release版中出现链接错误:
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinDependency/ATL1.dll : fatal error LNK1120: 1 unresolved externals
这是为什么,怎样解决?请高手指教
问题点数:20、回复次数:3Top
1 楼wyzegg(蛋)回复于 2001-10-23 00:07:02 得分 10
Project->Setting->C/C++ 的Category中选择Preprocessor的Preprocessor definitions:中去掉_ATL_MIN_CRT_。Top
2 楼param(烦烦烦)回复于 2001-10-23 09:30:29 得分 10
可以看看msdn中的atl教程,里面有关于这个问题的解答,同意楼上的Top
3 楼param(烦烦烦)回复于 2001-10-23 09:33:13 得分 0
Note for Release builds only When the ATL COM AppWizard generates the default project, it defines the macro _ATL_MIN_CRT. This macro is defined so that you don't bring the C Run-Time Library into your code if you don't need it. The polygon control needs the C Run-Time Library start-up code to initialize the floating-point functions. Therefore, you need to remove the _ATL_MIN_CRT macro if you want to build a Release version. To remove the macro, click Settings on the Project menu. In the Settings For: drop-down list, choose Multiple Configurations. In the Select project configuration(s) to modify dialog box that appears, click the check boxes for all four Release versions, then click OK. On the C/C++ tab, choose the General category, then remove _ATL_MIN_CRT from the Preprocessor definitions edit box.
Top




