出现这个问题的原因:缺少了manifest,程序因此无法正常载入C runtime library。

解决办法
解决方法有两个:

  1. 将编译得到的 $(APP).exe.manifest 一并打包,即和应用程序放在同一个文件夹下;
  2. 将manifest文件直接嵌入到可执行文件。

嵌入到可执行文件的方法是,需要在生成exe之后在执行下面的命令:

mt.exe –manifest $(APP).exe.manifest -outputresource:$(APP).exe;1

编译DLL的话,有一点点小区别的。

mt.exe –manifest $(LIB).dll.manifest -outputresource:$(LIB).dll;2

相关文章:

  • 2021-09-11
  • 2022-12-23
  • 2021-09-07
  • 2021-11-13
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
猜你喜欢
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-02-21
相关资源
相似解决方案