一个项目从vc6迁移到VS2005,在修改了一系列的类型警告后。编译成功了,Debug的时候,结果却冒出一个R6034错误:"An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information." Output Window:app.exe 中的 0x7c984ed1 处最可能的异常: 0xC0000142: DLL Initialization Failed。 编译条件是:Linker->Manifest File ->Allow Isolation:Yes。
(1)磁盘系统是fat32格式的:FAT32的时间精度不够,所以linker在生成文件的时候会出错,如果是ntfs的就没有问题.VS2005项目设置里面在清单工具(Manifest Tool)下面有一个选项"使用FAT32解决办法"(Use FAT32 work around)是专门解决这个问题的.对于FAT32的磁盘,需要选择"Yes",默认是"No".
(2)Visual Studio 2005用向导生成的项目,在运行时可能会遇到找不到MFC80UD.dll的问题。这个问题可能是Manifest 引起的,因此我们可以通过修改项目属性(properties)->清单工具(property pages)->链接(linker)-->manifest file -->Allow Isolation,把“嵌入清单”选“否”,.然后编译、链接、运行即可。
Visual Studio 2005用向导生成的项目,在运行时可能会遇到找不到MFC80UD.dll的问题。这个问题可能是Manifest 引起的,因此我们可以通过修改项目属性->清单工具->输入输出,把“嵌入清单(Embed Manifest)”选“否”,.然后编译、链接、运行即可。
(4)问了一个论坛上的网友,他说可能和Microsoft C++ Runtime Library有关系。
除此之外,一个参考文献上说的解决方法是:将Linker->Manifest File ->Allow Isolation:Do not Allow Side by Side isolation,则无论在Debug和Release条件,都出现如下:This application has failed to start because MSVCR80D.dll was not found. Re-installing the application may fix the problem."
关于这个问题,有篇博客文章上说:
1. 微软的解决方案。 在“属性->配置属性->清单工具->常规“下有一个”使用FAT32解决办法,设置为"是" 2. 找到你的工程的文件夹,如(myproject),找到其下的myproject/myproject/Debug/,Delete it.