【问题标题】:regex.h in msys2 (windows )msys2 中的 regex.h (windows )
【发布时间】:2018-03-14 19:41:59
【问题描述】:

我正在尝试在运行 msys2 的 Windows 上编译 cvs-fast-import (https://gitlab.com/esr/cvs-fast-export),但是当我运行 make 时出现错误:

ma​​in.c:9:10:致命错误:regex.h:没有这样的文件或目录

这指的是 main.c,它看起来像这样:

001 /*
002  *  Copyright © 2006 Keith Packard <keithp@keithp.com>
003  *
004  *  SPDX-License-Identifier: GPL-2.0+
005  */
006 #include "cvs.h"
007 #include <unistd.h>
008 #include <getopt.h>
009 #include <regex.h>
010 #include <time.h>
011 #include <sys/stat.h>
012 #include <sys/resource.h>
013 #include "revdir.h"
014 #if defined(__GLIBC__)
015 #include <malloc.h>
016 #endif /* __GLIBC__ */
... rest of file

我该如何解决这个问题,是否有我可以安装的软件包或者是否需要为另一个软件包重写软件?我希望有一个名为“regex”的 packman 安装程序,但在那里并不那么幸运。

我还在https://gitlab.com/esr/cvs-fast-export/issues/27 bugtracker 中发布了一个错误请求。

【问题讨论】:

    标签: regex compiler-errors msys2


    【解决方案1】:

    在我的系统上,/mingw32/include/regex.hmingw-w64-i686-libsystre 提供。尝试运行:

    pacman -S $MINGW_PACKAGE_PREFIX-libsystre
    

    【讨论】:

    • 谢谢@David,解决了。顺便说一句,你不知道我是怎么得到这个的吗? main.c:12:10: fatal error: sys/resource.h: No such file or directory
    猜你喜欢
    • 2017-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-19
    • 2016-05-12
    • 2021-09-09
    • 1970-01-01
    相关资源
    最近更新 更多