gpt4 book ai didi

c - 为什么我收到错误 "The program can' t start because msys-2.0.dll is missing from your computer”?有修复吗?

转载 作者:可可西里 更新时间:2023-11-01 10:14:33 24 4
gpt4 key购买 nike

我用 C 写了一个很长的程序,所以我没有写完整的代码。这些是我使用的库(以防万一)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <time.h>
#include <sys/types.h>
#include <dirent.h>
#include "xlsxwriter.h"

该程序在我的 Windows 计算机和我的工作计算机以及我有相同程序的地方运行完美。

但是当我在同事电脑上运行时出现这个错误:

System error:
The program can't start because msys-2.0.dll is missing from your computer.
Try reinstalling the program to fix this problem.

有没有什么方法可以在不安装整个 visual studio 的情况下让它工作?

菜鸟 C 程序员在这里!:)

编辑:我这样编译:

gcc Example.c -o Example -static-libgcc -std=c99 -lxlsxwriter -lz

最佳答案

MSYS可能是 MinGW相关的运行时库(可能是它的 C standard library )。

您需要在任何执行使用 MinGW 编译的二进制文件的 Windows 计算机上安装它。

另见 this问题。

可能要请同事安装MSYS2 .

或许还可以考虑构建一个静态链接的可执行文件(因此使用传递给 GCC-static 进行编译和链接)。

(这只是一个有根据的猜测;我从未使用过 Windows)

关于c - 为什么我收到错误 "The program can' t start because msys-2.0.dll is missing from your computer”?有修复吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45144542/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com