load the C runtime library without using a manifest

6 篇文章 0 订阅
5 篇文章 0 订阅

最近在将原来的工程中原来的动态链接库改为静态链接库时遇到这个问题。

首先,附上一些网上搜集到的东西。

-----------------------------------------------------------------------------------------------------

(转)http://blog.csdn.net/smujjiang/article/details/6458172

错误信息:
An application has made an attempt to load the C runtime library without using a manifest. This is an unsupported way to load Visual C++ DLLs. You need to modify your application to build with a manifest. 
For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation
解决办法:
一般这个错误是运行时出错,编译时不会报错。据说是由于调用某些静态库引起。
将编译生成的MyApp.exe.embed.manifest加入到资源文件中即可解决问题。

另外有人说可以通过新建工程来解决。

-----------------------------------------------------------------------------------------------------------

转 MSDN

C Run-Time Error R6034

An application has made an attempt to load the C runtime library without using a manifest. This is an unsupported way to load Visual C++ DLLs. You need to modify your application to build with a manifest. For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation.

Applications must use a manifest to load the C runtime library. For more information, see Visual C++ Libraries as Shared Side-by-Side Assemblies and Manifest Generation in Visual Studio.

In release builds, the diagnostic message reads: "An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information."

To correct this error

Rebuild your application with a manifest. Building an application with Visual Studio automatically puts the manifest into the resulting EXE or DLL file. If you are building at the command line, use the mt.exe tool to add the manifest as a resource. Use resource ID 1 if building an EXE, 2 if building a DLL. For more information, see How to: Embed a Manifest Inside a C/C++ Application.

-------------------------------------------------------------------------------------------------------------------

最终查看自己的工程设置,发现没有生成清单文件,改

连接器->清单文件->生成清单->是

重新编译通过。

但通常如此在运行时常会遇到“vs2005应用程序正常初始化失败的解决方案”的问题,详见下篇“vs2005应用程序正常初始化失败的解决方案”。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值