fatal error C1189

来源:互联网 发布:网络风暴怎么解决 编辑:程序博客网 时间:2024/05/16 02:02
fatal error C1189: #error :   Building MFC application with /MD (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD
这是由于VS2005默认的MFC程序是使用动态MFC库(Use MFC in a Shared DLL)来链接的而动态MFC库使用的是Multi-threaded DLL (/MD),由于XP对于PE文件格式监测更加严格,所以要进行如下的项目设置修改: 
[Project Properties] -->[Configuration Properties] --> [c/c++] -->[Code Generation]-->[RunTime Library]这里要改成[Multi-threaded (/MT)] 
再编译,通过了,但出现了一个Link错误:

corelibc.lib(wwinmain.obj) : error LNK2019: unresolved external symbol wWinMain referenced in function wWinMainCRTStartup
现在要做如下修改,因为程序默认Entry Point找不到了,重新打开项目设置 
Project Properties] -->[Configuration Properties] --> [Linker]-->[Advanced]-->[Entry Point]-->把[wWinMainCRTStartup]改成[WinMainCRTStartup] 
0 0
原创粉丝点击