问题
I am trying to compile cvs-fast-import (https://gitlab.com/esr/cvs-fast-export) on windows running msys2 but when I run make I get an error:
main.c:9:10: fatal error: regex.h: No such file or directory
This referrs to main.c which looks like this:
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
How do I correct this problem, is there a package I can install or do the software needs to be rewritten for another package? I was hoping there was a packman installer with the name "regex" however not so lucky there.
I also posted a bug request in the https://gitlab.com/esr/cvs-fast-export/issues/27 bugtracker.
回答1:
On my system, /mingw32/include/regex.h
is provided by mingw-w64-i686-libsystre
. Try running this:
pacman -S $MINGW_PACKAGE_PREFIX-libsystre
来源:https://stackoverflow.com/questions/49286438/regex-h-in-msys2-windows