最近在编译一个VC6.0工程(开发环境:win2000+VS6.0+Sp6),在加入预编译头后出现了下面的编译错误提示:
c:/program files/microsoft visual studio/vc98/include/xlocnum(106) :
fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1794)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more information
Error executing cl.exe.

工程中的每个cpp文件编译都没有问题(除了预编译头对应的cpp文件),很是奇怪,于是在网上找了一下,找到下面一种解决办法:

VC6.0的一个编译错误的解决

在window98下使用vc6.0时,如果预编译头文件(stdafx.h)中包含了模板类的头文件,比如atl的头文件时,编译器会报错:
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)

造成这种问题的原因是编译器分配的内存超过了限制。
解决的办法有三种:
1.给编译器增大内存限制。在project(工程)->setting(设置)->c/c++的project option(工程选项)中,添加/Zm#nn选项,#nn是一个数字,取值最大为2000。默认为100。但是这种方法好像没有什么用处。
2.将模板类头文件从stdafx.h中移出;
3.不使用预编译头文件。project->setting->c/c++,选择所有的.cpp文件,都使用“不使用预编译头文件“的选项。缺点是编译的时候很慢。

(http://www.ieasy.org/yuzuo/archives/2005_07.html)

还有一个英文的:

I see that while compiling ITEL.CPP it is trying and failing to open
Debug/IODIARY.PCH. I also see that there is no IODIARY.CPP. Exactly how is
IODIARY.PCH supposed to be created?

Turn off precompiled headers for all files in the project, and rebuild. If
the build still fails, then... uh-oh..

Modify the project to use the default STDAFX.CPP/STDAFX.H method of using
PCH. Then, add an empty file STDAFX.H and an empty file STDAFX.CPP to the
project. Then, for each .CPP file, add as the first line #include
"stdafx.h" . Then compile. This should work. If it does not... uh-oh.

In order for pre-compiled headers to work properly each .CPP must have as
its first #include statement the name of the one .H (such as STDAFX.H) that
includes all the "actual" .H's (windows.h, stdio.h, etc.) that should be
included by ALL .CPPs.

That is the important part. You don't usually want EVERYsingle .H that is
included in ANY .CPP in the project to be in STDAFX.H -- you do normally
want windows.h, because it is the big one that can include a lot and is
usually included in every .CPP. Putting just windows.h in stdafx.h (and
removing it from all the .CPPs) can speed up the build tremendously.

http://www.codecomments.com/archive307-2005-3-421145.html

在MSDN中搜索到这种错误相关主题:

*http://lab.msdn.microsoft.com/productfeedback/SearchResults.aspx?text=fatal+error+C1001%3a+INTERNAL+COMPILER+ERROR&stype=1&fields=1&type=0&witId=0&pId=0&category=0&os=0&oslang=0&status=0&msstatus=0&resolution=0&chgdays=&validation=0&votes=&voterating=0&workarounds=False&attachments=False

*http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/c1001.asp

后来把预编译去掉后,Build终于通过了运行了,可这也太慢了,郁闷中……

还不知有没更好的解决办法??同样的工程放在VC++.net2003中却编译顺利通过,运行正常.!!!!

VC6.0的一个编译错误:fatal error C1001: INTERNAL COMPILER ERROR。相关推荐

  1. 使用友元,编译出错fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) 的解决...

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明 http://lihuan-dianxian.blogbus.com/logs/42102230.html 同学拿了个很简单的小程序过 ...

  2. fatal error C1001: INTERNAL COMPILER ERROR

    http://www.ieasy.org/yuzuo/archives/2005_07.html (余佐的blog) VC6.0的一个编译错误的解决 在window98下使用vc6.0时,如果预编译头 ...

  3. fatal error C1001: INTERNAL COMPILER ERROR(compiler file 'msc1.cpp', line 1786)解决方法

    有时会碰到奇怪的编译错误 fatal error C1001: INTERNAL COMPILER ERROR(compiler file 'msc1.cpp', line 1786) 致命错误C10 ...

  4. VC6.0 realease下编译错误

    VC6.0编写FFT的程序时,debug通过,release链接时有错误fatal error C1001: INTERNAL COMPILER ERROR,网上很多资料说设定不使用预编译头文件,试验 ...

  5. 编译openwrt时报错:g++: internal compiler error: Killed (program cc1plus)

    答: 这是内存不足导致的,增大内存或者减少运行的线程即可 转载于:https://www.cnblogs.com/dakewei/p/10789571.html

  6. php.h not found,编译错误“fatal error: 'xxxx.h' file not found” 如何解决

    我们可能经常会出现编译错误的问题,本文作者也是在编译一个开源程序时遇到错误,然后整理出来,后面还带了一个在Mac OS X 上编译 Android 时的一个错误解决方法. 编译一个开源项目时遇到这样一 ...

  7. IAR的一个编译错误Error[e27]: Entry GenericApp_Init::?relay in module Coordinator

    IAR的一个编译错误Error[e27]: Entry "GenericApp_Init::?relay" in module Coordinator   我们在编译Zigbee协 ...

  8. gcc: internal compiler error: Killed (program cci)错误

    场景 最近想配置一个LNMP环境在Centos7上装mysql8.0的时候出现一个问题 internal compiler error: Killed (program cc1plus) 这个是个报错 ...

  9. 在使用pydelicious时出现HTTP Error 500: Internal Server Error的错误的解决方法:

    在使用pydelicious时出现HTTP Error 500: Internal Server Error的错误的解决方法: 参考文章: (1)在使用pydelicious时出现HTTP Error ...

最新文章

  1. 基于局部表面特征在杂乱场景中的三维物体识别
  2. 学习笔记99—word 如何增加底纹
  3. 实验二初入linux,实验二:熟悉Linux的环境
  4. blender怎么移动骨骼_日本这款人形机器人竟是多个机器人乐队的前辈!拥有人类骨骼,还会击鼓...
  5. ELK技术栈—Logstash—基础介绍
  6. oracle死锁解决常用方法(屡试不爽)
  7. 【整体二分】区间第k小(金牌导航 整体二分-1)
  8. Chrome浏览器各种文件的存放路径汇总
  9. Windows下配置Mysql免安装版
  10. DPDK笔记 RSS(receive side scaling)网卡分流机制
  11. (转自dflying chen)使用Anthem.NET 1.5中的FileUpload控件实现Ajax方式的文件上传
  12. 计算机屏幕地图是不是地图,地图软件 如何在截图时超出一个屏幕?
  13. 银联手机POS,支付黑科技
  14. wed基础和http
  15. 如何使用Outlook创建带有超链接的图片签名
  16. Windows7下Foxmail不能使用问题解决一例
  17. GD32VF103_定时器中断
  18. JS实现页面的自动滚动【自动阅读、JS小工具】
  19. cnc加工中心保养表_CNC保养检查记录表
  20. 【原创】新韭菜日记58--20190618 很久没写了,因为套牢,因为没内容可写

热门文章

  1. ubuntu 20.04与华为matepadPro实现文件互相访问【其他华为机型可参考】
  2. 【博学谷学习记录】超强总结,用心分享 | 架构师 Kafka学习总结
  3. QT编译的程序运行时缺少DLL如何处理
  4. Origin作图技巧
  5. [转]处理文件CRLF line terminators的问题
  6. 计算机网络安全技术王艳柏,网络安全渗透测试技术流程研究
  7. 中国桥牌在线 android,中国桥牌在线cbo手游
  8. 用一段哲理来鞭策自己,希望有个好的开始~
  9. 一个简洁的小H车调运模型
  10. Eclipse项目文件介绍