VS2008 问题汇总

1.中文乱码问题:
在资源视图中,右击对话框IDD,选择属性,将语言更改为Chinese (Simplified, PRC)即可。
 
或者在新建工程时,资源语言选择中文:

2.编译报错,需要编译两次才可以通过。
Project--->xxx Property Pages--->Configuration Properties--->Linker中的Enable Incremental Linking属性改为Default。

3.字符集问题导致编译报错:error C2664: 'strcpy' : cannot convert parameter 2 from 'wchar_t *' to 'const char *'。
Project--->xxx Property Pages--->Configuration Properties中的Character Set配置为Not Set即可。

4.编译为静态库。
Project--->xxx Property Pages--->Configuration Properties中的Use of MFC配置为Use MFC in a Static Library。

或者在新建工程时,选择为静态库即可:

5.改变字符集导致界面变为VC风格。
将文件stdafx.h中的最后关于UNICODE码的宏注释掉即可。
//#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
//#endif

6.使用fopen函数时,编译产生警告:
warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
解决方法:Project--->xxx Property Pages--->Configuration Properties--->C/C++--->Preprocessor--->Preprocessor Definitions添加_CRT_SECURE_NO_WARNINGS即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值