jsun
V2EX  ›  问与答

大家有在 win10 上开发 MFC 程序,并成功部署到 win7 或者 xp 电脑上吗

  •  
  •   jsun · Dec 26, 2019 · 2074 views
    This topic created in 2517 days ago, the information mentioned may be changed or developed.

    使用的工具是 Visual Studio 2017 Community,使用的工具集是 v141xp,系统是 Win10。

    打包成 msi 之后,安装到 win7 上报错提示缺少很多 api-ms 开头的 dll,例如 api-ms-core-memory-l1-1-2.dll 。

    一番搜索之后,发现是微软在 win10 上整合了 CRT,想要部署到低版本 win 系统需要提前安装 2015 或者 2017 VCRedist。但是这样很麻烦,其他人安装你的程序要先部署环境(安装 VCRedist ),所以我就像把用到 dll 提前整合进安装包,试了下也不行,说是每个系统的 api-ms 等 dll 不同。

    官方的 CRT 说明: https://devblogs.microsoft.com/cppblog/introducing-the-universal-crt/

    这种情况有大佬能说下怎么处理吗,头疼,搞得我想在 win7 上下载 vs2017 开发了

    4 replies  •  2019-12-26 17:13:33 +08:00
    cjw1115
    cjw1115
    Dec 26, 2019
    1
    试试链接的时候用 /MT 链接
    jsun
    jsun
    OP
    Dec 26, 2019
    2
    @cjw1115 谢谢,我试下。我之前用的是 /MD
    Buges
    Buges
    Dec 26, 2019 via Android
    3
    把 vcredist 整合进去一块安装
    现在装完系统第一件事难道不先来个 vcredist all in one 装起来。
    chinvo
    chinvo
    Dec 26, 2019 via iPhone
    4
    安装包里打包上 vc redistribution
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2402 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:41 · PVG 20:41 · LAX 04:41 · JFK 07:41
    ♥ Do have faith in what you're doing.