VsIDE编译问题整理

来源:互联网 发布:mac系统怎么删除文件 编辑:程序博客网 时间:2024/06/06 11:04

vs2008编译时的错误:

fatal error C1060: compiler is out of heap space

出现的原因: 使用了xtreme界面库, 引入了一个ocx(依赖好多静态链接的第三方库), 在Debug环境编译时出现此错误.

解决方法: c++选项手工增加 /Zm512 选项

备注: /Zm1000也不行. 可能和PC配置有关. /Zm最大值为2000

官方线索: http://msdn.microsoft.com/en-us/library/bdscwf1c%28v=VS.71%29.aspx

 

<2010_1027_0959>

vs2008运行时R6034的报错问题, 官方说法是必须.exe带上.manifest文件, 如果不要外部的manifest, 内嵌.manifest是必须的

 

<2010_1122_2209>

如果有的函数有定义, 却编译不过. 试一下增加Windows编译的版本号

#define WINVER 0x500

#define _WIN32_WINNT 0x500
#define _WIN32_WINDOWS 0x500
#define _WIN32_IE 0x500
//0x400 means Change this to the appropriate value to target Win98 and Win2K or later.
//0x410 means Change this to the appropriate value to target WinMe or later.
//0x500 means Change this to the appropriate value to target WinXp or later.
//对于_WIN32_IE, 0x400 means IE4 or later, 0x500 means IE5 or later

<2010_1122_2219>
如果该包含的头都包含上了, 但是还是遇到交叉编译, 相互引用的问题,
可以试一下用前向定义的方法来解决编译问题, 一般是在.cpp中遇到这种问题.
/**
* @note
* Forward declaration 's Sample
* class CNTServiceControlManager;
*/
原创粉丝点击