我正在尝试在运行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.h
由mingw-w64-i686-libsystre
提供。尝试运行此:
pacman -S $MINGW_PACKAGE_PREFIX-libsystre
关于regex - msys2中的regex.h(Windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49286438/