regex - msys2中的regex.h(Windows)

标签 regex compiler-errors msys2

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

main.c:9:10: fatal error: regex.h: No such file or directory



此引用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中发布了一个错误请求。

最佳答案

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

pacman -S $MINGW_PACKAGE_PREFIX-libsystre

关于regex - msys2中的regex.h(Windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49286438/

相关文章:

c++ - C++多线程错误: no matching function for call to 'std::thread::thread(<unresolved overloaded function type>

windows - 为什么 binutils-gdb 无法从 MSYS2 构建?

windows - 如何使用 sys/ioctl.h 将代码移植到 MinGW gcc?

javascript - JS 正则表达式匹配没有 backref 的单词选项

python - 如何检查数据框中的文本列是否包含可能的模式列表,从而允许错误输入?

c++ - 我怎样才能克服 "unsafe"错误?

java - MSys2 下的 Scala - 无法初始化终端

c# - 字符串的正则表达式以数字开头,后跟字母

Java 正则表达式过于贪婪地捕获组

java - Java 中的错误消息帮助