在windows7中使用msys2的mingw64编译 strongswan-5.6.3的在编译openssl_ec_private_key.c 时错误

1.编译环境--windows7的 MSYS2 中mingw64 编译环境,strongswan版本为 5.6.3
2.使用的./configure 配置如下:

./configure --disable-defaults --enable-monolithic --enable-static \
--enable-svc --enable-ikev2 --enable-ikev1  \
--enable-nonce --enable-pem --enable-pkcs1 \
--enable-x509 --enable-openssl --enable-socket-win \
--enable-kernel-wfp --enable-kernel-iph --enable-pubkey \
--enable-swanctl --with-swanctldir=swanctl \
--with-strongswan-conf=strongswan.conf --host=x86_64-w64-mingw32

3.当编译到strongswan-5.6.3\src\libstrongswan\plugins\openssl\openssl_ec_private_key.c 时发生错误如下:

/bin/sh ../../../../libtool  --tag=CC   --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src/libstrongswan -DFIPS_MODE=0 -I/mingw64/include  -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -mno-ms-bitfields -include /d/strongswan-5.6.3/config.h -c -o openssl_ec_private_key.lo openssl_ec_private_key.c
libtool: compile:  x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/libstrongswan -DFIPS_MODE=0 -I/mingw64/include -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -mno-ms-bitfields -include /d/strongswan-5.6.3/config.h -c openssl_ec_private_key.c  -DDLL_EXPORT -DPIC -o .libs/openssl_ec_private_key.o
In file included from D:/MYSYS-64-SOURCE/mingw64/x86_64-w64-mingw32/include/windows.h:95,
                 from D:/MYSYS-64-SOURCE/mingw64/x86_64-w64-mingw32/include/winsock2.h:23,
                 from ../../../../src/libstrongswan/utils/compat/windows.h:24,
                 from ../../../../src/libstrongswan/utils/utils.h:39,
                 from ../../../../src/libstrongswan/library.h:101,
                 from ../../../../src/libstrongswan/credentials/builder.h:41,
                 from openssl_ec_private_key.h:26,
                 from openssl_ec_private_key.c:21:
D:/MYSYS-64-SOURCE/mingw64/include/openssl/x509.h:83:34: error: expected ')' before numeric constant
   83 | typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS;

4.其中的 mingw64/include/openssl/x509.h 是 mingw64 自身安装的 openssl
5.如何去除 MYSYS-64-SOURCE/mingw64/include/openssl/x509.h:83:34: error: expected ')' before numeric constant 这个问题?

你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答


本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。


因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。